/* Order Form Bottom Sheet - iOS 18 Style */

/* Overlay */
.order-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.order-form-overlay.active {
    opacity: 1;
}

/* Bottom Sheet */
.order-form-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-main);
    backdrop-filter: var(--blur-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border: 1px solid var(--glass-border);
    border-bottom: none;
    max-height: 95vh;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.order-form-sheet.active {
    transform: translateY(0);
}

/* Header */
.order-form-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--glass-border);
    text-align: center;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.04) 100%
    );
}

.order-form-drag-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 0 auto 12px;
}

.order-form-header h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    color: white;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.order-form-subtitle {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

/* Content */
.order-form-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Form Sections */
.form-section {
    margin-bottom: 24px;
}

.form-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 4px;
}

.form-section-header span:first-child {
    font-size: 15px;
    font-weight: 600;
    color: white;
}

.form-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

/* Form Groups */
.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Labels */
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 6px;
    padding-left: 4px;
}

.required {
    color: #FF453A;
}

/* Inputs */
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 500;
    transition: all var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(10, 132, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Form Error */
.form-error {
    background: rgba(255, 69, 58, 0.15);
    border: 1px solid rgba(255, 69, 58, 0.3);
    border-radius: 10px;
    padding: 10px 12px;
    color: #FF453A;
    font-size: 13px;
    font-weight: 500;
    margin-top: 8px;
}

/* Actions */
.order-form-actions {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--glass-border);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.06) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
}

.order-btn-secondary,
.order-btn-primary {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.order-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.order-btn-secondary:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.15);
}

.order-btn-primary {
    background: linear-gradient(135deg, #0A84FF 0%, #0066CC 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3);
}

.order-btn-primary:active {
    transform: scale(0.97);
    background: linear-gradient(135deg, #0066CC 0%, #0052A3 100%);
}

.order-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Scrollbar styling */
.order-form-content::-webkit-scrollbar {
    width: 6px;
}

.order-form-content::-webkit-scrollbar-track {
    background: transparent;
}

.order-form-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.order-form-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Wallet-specific styles */
.wallet-hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin: 6px 0 0 4px;
    font-weight: 500;
}

.wallet-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(10, 132, 255, 0.15);
    border: 1px solid rgba(10, 132, 255, 0.3);
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 8px;
}

.wallet-notice svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: rgba(10, 132, 255, 0.8);
}

.wallet-notice span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    font-weight: 500;
}

/* ===== Customer Order Details Sheet ===== */

.customer-order-details-sheet .vendor-group-section {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.vendor-group-header-full {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--glass-border);
}

.vendor-group-header-full svg {
    opacity: 0.6;
}

.vendor-group-header-full .vendor-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.vendor-items-list {
    margin: 12px 0;
}

.vendor-subtotal {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--glass-border);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

/* Shipment Card - Separate card for tracking and actions */
.shipment-card {
    margin-bottom: 24px;
    padding: 14px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

/* Tracking Display - Simple text line, no badge */
.tracking-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    background: none !important;
    padding: 0 !important;
    border: none !important;
}

.tracking-label {
    font-weight: 400;
    background: none !important;
}

.tracking-code {
    color: var(--text-primary);
    font-weight: 500;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    background: none !important;
    padding: 0 !important;
    border: none !important;
}

/* Vendor Actions */
.vendor-actions {
    margin-top: 12px;
}

/* When vendor actions are first child in shipment card (no tracking) */
.shipment-card > .vendor-actions:first-child {
    margin-top: 0;
}

.btn-confirm-delivery {
    width: 100%;
    padding: 12px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-confirm-delivery:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.btn-confirm-delivery svg {
    width: 20px;
    height: 20px;
}

/* Review Form */
.review-form {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.review-form-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

/* Star Rating Input */
.star-rating-input {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 16px 0;
}

.star-rating-input .star {
    font-size: 32px;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.star-rating-input .star:hover,
.star-rating-input .star.active {
    color: #FFD700;
    transform: scale(1.1);
}

.star-rating-input .star:active {
    transform: scale(0.95);
}

/* Review Comment Input */
.review-comment-input {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    background: var(--bg-main);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin: 12px 0;
}

.review-comment-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.review-comment-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Review Form Actions */
.review-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.review-form-actions .btn-cancel {
    flex: 1;
    padding: 12px;
    background: var(--bg-main);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.review-form-actions .btn-cancel:active {
    transform: scale(0.98);
    opacity: 0.8;
}

.review-form-actions .btn-submit-review {
    flex: 2;
    padding: 12px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.review-form-actions .btn-submit-review:active {
    transform: scale(0.98);
    opacity: 0.9;
}
