/* ==========================================
   BOOKING FORMS - CUSTOMER DATA & PAYMENT
   Customer Forms, Payment Methods, Phone Input
   ========================================== */

/* ==========================================
   CUSTOMER FORM
   ========================================== */
.customer-form {
    background: transparent;
}

.form-section {
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent) 0%, var(--primary) 100%);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.form-section:hover {
    border-color: rgba(93, 78, 140, 0.2);
    box-shadow: var(--shadow-sm);
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--accent);
    font-size: 1.25rem;
}

/* Form Labels */
.form-label.fw-medium {
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.9375rem;
    margin-bottom: var(--spacing-sm);
}

/* Divider */
.divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gray-300), transparent);
    margin: var(--spacing-lg) 0;
}

/* Room Summary Card */
.room-summary-card {
    background: var(--gray-50);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-base);
}

.room-summary-card:hover {
    background: var(--white);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.room-summary-card img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.room-summary-card .no-image {
    height: 80px;
}

/* Info Box */
.info-box {
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.info-box p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.info-box i {
    color: #d97706;
}

.info-box ul {
    margin-bottom: 0;
    padding-left: 1.25rem;
}

/* Custom Checkbox */
.custom-checkbox .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.25rem;
    border: 2px solid var(--gray-400);
    cursor: pointer;
}

.custom-checkbox .form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.custom-checkbox .form-check-label {
    font-size: 0.9375rem;
    color: var(--gray-700);
    cursor: pointer;
    padding-left: 0.5rem;
}

/* ==========================================
   PHONE NUMBER WITH COUNTRY CODE
   ========================================== */

/* Custom Country Code Dropdown */
.country-code-dropdown {
    position: relative;
    min-width: 85px;
    max-width: 95px;
}

.country-code-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    cursor: pointer;
    font-size: 1.0625rem;
    font-weight: 500;
    white-space: nowrap;
    height: auto;
    min-height: calc(1.5em + 1.75rem + 2px);
}

.country-code-trigger:hover {
    background-color: var(--gray-50);
}

.country-code-trigger:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(204, 125, 20, 0.1);
    outline: none;
}

.country-code-trigger .flag,
.country-item .flag {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.country-code-trigger .bi-chevron-down {
    font-size: 0.875rem;
    color: var(--gray-600);
    transition: transform var(--transition-fast);
}

.country-code-trigger[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.country-code-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 280px;
    max-width: 320px;
    max-height: 400px;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-top: 0.25rem;
    display: none;
}

.country-code-menu.show {
    display: block;
}

/* Search Input */
.country-search-wrapper {
    position: relative;
    padding: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.country-search {
    padding-left: 2.5rem;
    font-size: 0.875rem;
}

.country-search-wrapper .bi-search {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    pointer-events: none;
}

/* Country List */
.country-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 0.5rem;
}

.country-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.country-item:hover {
    background-color: var(--gray-100);
}

.country-item.active {
    background-color: var(--primary);
    color: var(--white);
}

.country-item .country-name {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 500;
}

.country-item .country-code {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

.country-item.active .country-code {
    color: rgba(255, 255, 255, 0.9);
}

.country-item.hidden {
    display: none;
}

/* Style the phone input to connect seamlessly */
.input-group .country-code-dropdown + .form-control {
    border-left: 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.input-group .country-code-dropdown:has(.country-code-trigger:focus) + .form-control {
    border-left: 0;
    border-color: var(--accent);
}

/* Scrollbar styling */
.country-list::-webkit-scrollbar {
    width: 6px;
}

.country-list::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

.country-list::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 3px;
}

.country-list::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* ==========================================
   PAYMENT METHOD SELECTION
   ========================================== */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.payment-method-option {
    cursor: pointer;
    margin-bottom: 0;
}

.payment-method-option input[type="radio"] {
    display: none;
}

.payment-method-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.payment-method-card:hover {
    border-color: #0066cc;
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.payment-method-option input[type="radio"]:checked + .payment-method-card {
    border-color: #0066cc;
    background-color: #f0f7ff;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.payment-method-card i {
    font-size: 2.5rem;
    color: #0066cc;
    margin-bottom: 0.75rem;
    display: block;
}

.payment-method-card h6 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.payment-method-card p {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.4;
}

.payment-method-card.active {
    border-color: #0066cc;
    background-color: #f0f7ff;
}

/* ==========================================
   BANK DETAILS DISPLAY
   ========================================== */
.bank-detail-item {
    padding: 0.875rem 0;
    border-bottom: 1px solid #e9ecef;
}

.bank-detail-item:first-child {
    padding-top: 0;
}

.bank-detail-item:last-child {
    border-bottom: none;
}

.bank-detail-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.bank-detail-value {
    color: #212529;
    font-size: 1rem;
}

.bank-detail-value-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.bank-detail-value-row .bank-detail-value {
    flex: 1;
    word-break: break-word;
    color: #212529;
}

.bank-detail-value-row .btn-link {
    color: #0066cc;
    text-decoration: none;
    flex-shrink: 0;
    min-width: 24px;
    line-height: 1;
}

.bank-detail-value-row .btn-link:hover {
    color: #004499;
}

.bank-detail-value-row .btn-link i {
    font-size: 1.1rem;
}

/* ==========================================
   PAYMENT INFO
   ========================================== */
.payment-info {
    padding: var(--spacing-sm) 0;
}

.payment-info ul li {
    display: flex;
    align-items: center;
    font-size: 0.9375rem;
    color: var(--gray-700);
}

.payment-info ul li i {
    font-size: 1rem;
    min-width: 1.5rem;
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */
@media (max-width: 768px) {
    .form-section {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-md);
    }
    
    .section-title {
        font-size: 1rem;
        margin-bottom: var(--spacing-md);
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
    
    .payment-method-card {
        padding: 1.25rem 1rem;
    }
    
    .bank-detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .bank-detail-row .label {
        font-size: 0.875rem;
    }
    
    .bank-detail-row .value {
        text-align: left;
        font-size: 0.875rem;
    }
    
    /* Navigation Buttons - Reverse order on mobile (Next button on top) */
    .booking-form > .d-flex.justify-content-between,
    form > .d-flex.justify-content-between {
        flex-direction: column-reverse !important;
        gap: 0.75rem;
    }
    
    .booking-form > .d-flex.justify-content-between > .btn,
    .booking-form > .d-flex.justify-content-between > a.btn,
    form > .d-flex.justify-content-between > .btn,
    form > .d-flex.justify-content-between > a.btn {
        width: 100%;
    }
    
    /* Confirmation page already uses d-grid, which is correct */
    .d-grid .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .form-section {
        padding: 0.75rem !important;
    }
    
    /* Navigation Buttons - Keep reversed on small screens too */
    .booking-form > .d-flex.justify-content-between,
    form > .d-flex.justify-content-between {
        flex-direction: column-reverse !important;
        gap: 0.5rem;
    }
    
    .booking-form > .d-flex.justify-content-between > .btn,
    .booking-form > .d-flex.justify-content-between > a.btn,
    form > .d-flex.justify-content-between > .btn,
    form > .d-flex.justify-content-between > a.btn {
        width: 100%;
    }
}


