/**
 * Hotel Booking - Frontend Booking Form Styles
 * 
 * @package HotelBooking
 * @since 2.4.0
 */

/* ============================================
   CSS Variables
   ============================================ */
.hb-booking-form-wrapper {
    --hb-primary-color: #3498db;
    --hb-primary-hover: #2980b9;
    --hb-secondary-color: #2c3e50;
    --hb-theme-primary: var(--hb-primary-color);
    --hb-theme-primary-hover: var(--hb-primary-hover);
    --hb-theme-secondary: var(--hb-secondary-color);
    --hb-theme-soft: rgba(52, 152, 219, 0.08);
    --hb-theme-focus: rgba(52, 152, 219, 0.15);
    --hb-success-color: #27ae60;
    --hb-warning-color: #f39c12;
    --hb-danger-color: #e74c3c;
    --hb-text-color: #333333;
    --hb-text-muted: #666666;
    --hb-border-color: #dddddd;
    --hb-bg-light: #f8f9fa;
    --hb-bg-dark: #2c3e50;
    --hb-border-radius: 8px;
    --hb-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --hb-transition: all 0.3s ease;
}

/* ============================================
   Base Styles
   ============================================ */
.hb-booking-form-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--hb-text-color);
}

.hb-booking-form-wrapper * {
    box-sizing: border-box;
}

/* ============================================
   Form Container
   ============================================ */
.hb-booking-form {
    background: #ffffff;
    border-radius: var(--hb-border-radius);
    box-shadow: var(--hb-box-shadow);
    padding: 30px;
    margin: 20px 0;
}

.hb-booking-form-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--hb-secondary-color);
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--hb-primary-color);
}

/* ============================================
   Form Fields
   ============================================ */
.hb-form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.hb-form-group {
    flex: 1;
    min-width: 200px;
    padding: 0 10px;
    margin-bottom: 20px;
}

.hb-form-group.hb-full-width {
    flex: 0 0 100%;
}

.hb-form-group.hb-half-width {
    flex: 0 0 50%;
}

.hb-form-group.hb-third-width {
    flex: 0 0 33.333%;
}

.hb-form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--hb-secondary-color);
}

.hb-form-label .required {
    color: var(--hb-danger-color);
    margin-left: 3px;
}

.hb-form-input,
.hb-form-select,
.hb-form-textarea {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    border: 1px solid var(--hb-border-color);
    border-radius: var(--hb-border-radius);
    background: #ffffff;
    transition: var(--hb-transition);
}

.hb-form-input:focus,
.hb-form-select:focus,
.hb-form-textarea:focus {
    outline: none;
    border-color: var(--hb-primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.hb-form-input:disabled,
.hb-form-select:disabled {
    background: var(--hb-bg-light);
    cursor: not-allowed;
}

.hb-form-textarea {
    min-height: 100px;
    resize: vertical;
}

/* ============================================
   Date Picker Styles
   ============================================ */
.hb-date-picker-wrapper {
    position: relative;
}

.hb-date-picker-wrapper .hb-form-input {
    padding-right: 40px;
}

.hb-date-picker-wrapper::after {
    content: '\f073';
    font-family: 'Font Awesome 5 Free', 'dashicons';
    font-weight: 400;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hb-text-muted);
    pointer-events: none;
}

/* ============================================
   Room Selection
   ============================================ */
.hb-room-selection {
    background: var(--hb-bg-light);
    border-radius: var(--hb-border-radius);
    padding: 20px;
    margin: 20px 0;
}

.hb-room-card {
    background: #ffffff;
    border: 1px solid var(--hb-border-color);
    border-radius: var(--hb-border-radius);
    padding: 20px;
    margin-bottom: 15px;
    transition: var(--hb-transition);
    cursor: pointer;
}

.hb-room-card:hover {
    border-color: var(--hb-primary-color);
    box-shadow: var(--hb-box-shadow);
}

.hb-room-card.selected {
    border-color: var(--hb-primary-color);
    border-width: 2px;
    background: var(--hb-theme-soft);
}

.hb-room-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.hb-room-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--hb-secondary-color);
    margin: 0;
}

.hb-room-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--hb-primary-color);
}

.hb-room-price small {
    font-size: 12px;
    font-weight: 400;
    color: var(--hb-text-muted);
}

.hb-room-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.hb-room-detail {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--hb-text-muted);
}

.hb-room-detail i {
    color: var(--hb-primary-color);
}

/* ============================================
   Booking Summary
   ============================================ */
.hb-booking-summary {
    background: var(--hb-bg-light);
    border-radius: var(--hb-border-radius);
    padding: 25px;
    margin: 20px 0;
}

.hb-summary-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--hb-secondary-color);
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--hb-border-color);
}

.hb-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.hb-summary-row:last-child {
    border-bottom: none;
}

.hb-summary-label {
    color: var(--hb-text-muted);
}

.hb-summary-value {
    font-weight: 600;
    color: var(--hb-text-color);
}

.hb-summary-total {
    background: var(--hb-secondary-color);
    color: #ffffff;
    margin: 20px -25px -25px -25px;
    padding: 20px 25px;
    border-radius: 0 0 var(--hb-border-radius) var(--hb-border-radius);
}

.hb-summary-total .hb-summary-row {
    border-bottom: none;
    padding: 5px 0;
}

.hb-summary-total .hb-summary-label {
    color: rgba(255, 255, 255, 0.8);
}

.hb-summary-total .hb-summary-value {
    color: #ffffff;
    font-size: 20px;
}

/* ============================================
   Buttons
   ============================================ */
.hb-btn {
    display: inline-block;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--hb-border-radius);
    cursor: pointer;
    transition: var(--hb-transition);
}

.hb-btn-primary {
    background: var(--hb-primary-color);
    color: #ffffff;
}

.hb-btn-primary:hover {
    background: var(--hb-primary-hover);
    color: #ffffff;
}

.hb-btn-secondary {
    background: var(--hb-secondary-color);
    color: #ffffff;
}

.hb-btn-secondary:hover {
    background: #1a252f;
    color: #ffffff;
}

.hb-btn-success {
    background: var(--hb-success-color);
    color: #ffffff;
}

.hb-btn-success:hover {
    background: #219a52;
    color: #ffffff;
}

.hb-btn-outline {
    background: transparent;
    border: 2px solid var(--hb-primary-color);
    color: var(--hb-primary-color);
}

.hb-btn-outline:hover {
    background: var(--hb-primary-color);
    color: #ffffff;
}

.hb-btn-block {
    display: block;
    width: 100%;
}

.hb-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   Alerts & Messages
   ============================================ */
.hb-alert {
    padding: 15px 20px;
    border-radius: var(--hb-border-radius);
    margin: 15px 0;
}

.hb-alert-success {
    background: rgba(39, 174, 96, 0.1);
    border: 1px solid var(--hb-success-color);
    color: var(--hb-success-color);
}

.hb-alert-warning {
    background: rgba(243, 156, 18, 0.1);
    border: 1px solid var(--hb-warning-color);
    color: #c27d0e;
}

.hb-alert-danger {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid var(--hb-danger-color);
    color: var(--hb-danger-color);
}

.hb-alert-info {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid var(--hb-primary-color);
    color: var(--hb-primary-color);
}

/* ============================================
   Loading Spinner
   ============================================ */
.hb-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: hb-spin 0.8s linear infinite;
}

@keyframes hb-spin {
    to {
        transform: rotate(360deg);
    }
}

.hb-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.hb-loading-overlay .hb-loading {
    width: 50px;
    height: 50px;
    border-width: 4px;
    border-color: rgba(52, 152, 219, 0.3);
    border-top-color: var(--hb-primary-color);
}

/* ============================================
   Payment Methods
   ============================================ */
.hb-payment-methods {
    margin: 20px 0;
}

.hb-payment-method {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border: 1px solid var(--hb-border-color);
    border-radius: var(--hb-border-radius);
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--hb-transition);
}

.hb-payment-method:hover {
    border-color: var(--hb-primary-color);
}

.hb-payment-method.selected {
    border-color: var(--hb-primary-color);
    border-width: 2px;
    background: var(--hb-theme-soft);
}

.hb-payment-method input[type="radio"] {
    margin-right: 15px;
}

.hb-payment-method-icon {
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

.hb-payment-method-name {
    font-weight: 600;
    color: var(--hb-secondary-color);
}

.hb-payment-method-desc {
    font-size: 13px;
    color: var(--hb-text-muted);
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 768px) {
    .hb-booking-form {
        padding: 20px;
    }
    
    .hb-form-group.hb-half-width,
    .hb-form-group.hb-third-width {
        flex: 0 0 100%;
    }
    
    .hb-room-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .hb-summary-total {
        margin: 20px -20px -20px -20px;
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    .hb-booking-form {
        padding: 15px;
        margin: 10px 0;
    }
    
    .hb-booking-form-title {
        font-size: 20px;
    }
    
    .hb-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .hb-booking-form {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .hb-btn {
        display: none;
    }
}

/* ============================================
   Modern Compact Typography Layer
   ============================================ */
.hb-booking-form-wrapper {
    --hb-font-sans: Inter, "Aptos", "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --hb-font-display: "Aptos Display", "Segoe UI Variable Display", Inter, "Segoe UI", Roboto, Arial, sans-serif;
    --hb-type-xs: 11px;
    --hb-type-sm: 12.5px;
    --hb-type-base: 13.5px;
    --hb-type-md: 14.5px;
    --hb-type-lg: 17px;
    --hb-type-xl: 22px;
    --hb-line-tight: 1.25;
    --hb-line-base: 1.45;
    --hb-line-relaxed: 1.6;

    font-family: var(--hb-font-sans);
    font-size: var(--hb-type-base);
    line-height: var(--hb-line-base);
    color: #172033;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

.hb-booking-form-wrapper * {
    font-family: inherit;
}

.hb-booking-form-wrapper h1,
.hb-booking-form-wrapper h2,
.hb-booking-form-wrapper h3,
.hb-booking-form-wrapper h4,
.hb-booking-form-wrapper h5,
.hb-booking-form-wrapper h6,
.hb-booking-form-title,
.hb-summary-title,
.hb-room-name {
    font-family: var(--hb-font-display) !important;
    color: var(--hb-theme-secondary) !important;
    line-height: var(--hb-line-tight) !important;
    letter-spacing: -0.035em !important;
    font-weight: 700 !important;
}

.hb-booking-form-wrapper h1,
.hb-booking-form-wrapper h2 {
    font-size: clamp(22px, 2.4vw, 28px) !important;
}

.hb-booking-form-wrapper h3,
.hb-booking-form-title {
    font-size: clamp(18px, 2vw, var(--hb-type-xl)) !important;
}

.hb-booking-form-wrapper h4,
.hb-summary-title {
    font-size: var(--hb-type-lg) !important;
}

.hb-booking-form-wrapper h5,
.hb-booking-form-wrapper h6 {
    font-size: var(--hb-type-md) !important;
}

.hb-booking-form-wrapper p,
.hb-booking-form-wrapper li,
.hb-booking-form-wrapper td,
.hb-booking-form-wrapper th,
.hb-booking-form-wrapper span,
.hb-booking-form-wrapper div {
    line-height: var(--hb-line-base);
}

.hb-booking-form-wrapper label,
.hb-form-label,
.hb-summary-label,
.hb-payment-method-name {
    font-size: var(--hb-type-sm) !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    letter-spacing: 0.01em;
    color: #334155 !important;
}

.hb-booking-form-wrapper small,
.hb-room-price small,
.hb-payment-method-desc,
.hb-room-detail,
.hb-summary-label {
    font-size: var(--hb-type-sm) !important;
    line-height: var(--hb-line-base) !important;
    color: #64748b !important;
}

.hb-booking-form-wrapper input[type="text"],
.hb-booking-form-wrapper input[type="email"],
.hb-booking-form-wrapper input[type="number"],
.hb-booking-form-wrapper input[type="date"],
.hb-booking-form-wrapper input[type="time"],
.hb-booking-form-wrapper input[type="tel"],
.hb-booking-form-wrapper input[type="url"],
.hb-booking-form-wrapper select,
.hb-booking-form-wrapper textarea,
.hb-form-input,
.hb-form-select,
.hb-form-textarea {
    min-height: 40px;
    padding: 9px 12px !important;
    border-color: #cbd5e1 !important;
    border-radius: 10px !important;
    color: #0f172a !important;
    font-family: var(--hb-font-sans) !important;
    font-size: var(--hb-type-base) !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
}

.hb-booking-form-wrapper textarea,
.hb-form-textarea {
    min-height: 86px;
    line-height: var(--hb-line-relaxed) !important;
}

.hb-booking-form-wrapper input:focus,
.hb-booking-form-wrapper select:focus,
.hb-booking-form-wrapper textarea:focus,
.hb-form-input:focus,
.hb-form-select:focus,
.hb-form-textarea:focus {
    border-color: var(--hb-theme-primary) !important;
    box-shadow: 0 0 0 3px var(--hb-theme-focus) !important;
    outline: none !important;
}

.hb-booking-form-wrapper button,
.hb-booking-form-wrapper .button,
.hb-btn {
    min-height: 38px;
    padding: 9px 18px !important;
    border-radius: 10px !important;
    font-family: var(--hb-font-sans) !important;
    font-size: var(--hb-type-sm) !important;
    font-weight: 750 !important;
    line-height: 1.25 !important;
    letter-spacing: 0.01em;
}

.hb-booking-form-wrapper table {
    font-size: var(--hb-type-sm) !important;
    line-height: var(--hb-line-base);
}

.hb-booking-form-wrapper th {
    font-size: var(--hb-type-xs) !important;
    font-weight: 800 !important;
    letter-spacing: 0.055em !important;
    text-transform: uppercase;
}

.hb-booking-form-wrapper td {
    font-size: var(--hb-type-sm) !important;
}

.hb-room-name {
    font-size: var(--hb-type-lg) !important;
}

.hb-room-price,
.hb-summary-total .hb-summary-value {
    font-size: 18px !important;
    font-weight: 750 !important;
    letter-spacing: -0.02em;
}

.hb-alert {
    font-size: var(--hb-type-base);
    line-height: var(--hb-line-base);
}

.hb-booking-form-wrapper a {
    color: var(--hb-theme-primary);
}

.hb-booking-form-wrapper h1,
.hb-booking-form-wrapper h2,
.hb-booking-form-wrapper h3,
.hb-booking-form-wrapper h4,
.hb-booking-form-wrapper h5,
.hb-booking-form-wrapper h6 {
    color: var(--hb-theme-secondary) !important;
}

.hb-booking-form-wrapper button,
.hb-booking-form-wrapper .button,
.hb-booking-form-wrapper .hb-btn-primary,
.hb-booking-form-wrapper .hb-step-prev-btn,
#hb-check-availability-btn,
#hb-check-dorm-availability-btn,
#hb-step-3-continue,
#hb-step-4-continue,
#hb-submit-transaction-reference {
    background: var(--hb-theme-primary) !important;
    border-color: var(--hb-theme-primary) !important;
    color: #fff !important;
}

.hb-booking-form-wrapper button:hover,
.hb-booking-form-wrapper .button:hover,
.hb-booking-form-wrapper .hb-btn-primary:hover,
#hb-check-availability-btn:hover,
#hb-check-dorm-availability-btn:hover,
#hb-step-3-continue:hover,
#hb-step-4-continue:hover,
#hb-submit-transaction-reference:hover {
    background: var(--hb-theme-primary-hover) !important;
    border-color: var(--hb-theme-primary-hover) !important;
}

.hb-booking-form-wrapper .hb-btn-outline {
    background: transparent !important;
    border-color: var(--hb-theme-primary) !important;
    color: var(--hb-theme-primary) !important;
}

.hb-booking-form-wrapper .hb-btn-outline:hover {
    background: var(--hb-theme-primary) !important;
    color: #fff !important;
}

.hb-booking-form-wrapper .hb-type-label {
    position: relative;
    gap: 8px;
    background: #fff !important;
    border-color: #dbe4ef !important;
    color: #334155 !important;
}

.hb-booking-form-wrapper .hb-type-label input[type="checkbox"] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    opacity: 0 !important;
    pointer-events: none;
}

.hb-booking-form-wrapper .hb-type-label::before {
    content: "";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 4px;
    color: inherit;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.hb-booking-form-wrapper .hb-type-active,
.hb-booking-form-wrapper .hb-step-indicator.hb-step-active > div:first-child {
    background: var(--hb-theme-primary) !important;
    border-color: var(--hb-theme-primary) !important;
    color: #fff !important;
}

.hb-booking-form-wrapper .hb-type-active::before {
    content: "\2713";
    border-color: #fff;
    background: #fff;
    color: var(--hb-theme-primary);
}

.hb-booking-form-wrapper .hb-step-indicator.hb-step-active > div:last-child,
#hb-current-step-text,
.hb-booking-form-wrapper .summary-value,
.hb-booking-form-wrapper .hb-room-price {
    color: var(--hb-theme-primary) !important;
}

.hb-booking-form-wrapper .hb-booking-form-title,
.hb-booking-form-wrapper .hb-summary-title {
    border-color: var(--hb-theme-primary) !important;
}

@media (max-width: 768px) {
    .hb-booking-form-wrapper {
        font-size: 14px;
    }

    .hb-booking-form-wrapper input[type="text"],
    .hb-booking-form-wrapper input[type="email"],
    .hb-booking-form-wrapper input[type="number"],
    .hb-booking-form-wrapper input[type="date"],
    .hb-booking-form-wrapper input[type="time"],
    .hb-booking-form-wrapper input[type="tel"],
    .hb-booking-form-wrapper select,
    .hb-booking-form-wrapper textarea {
        min-height: 44px;
        font-size: 16px !important;
    }
}

