/* Room Booking System - Frontend Styles v1.0.1 */
:root {
    --primary: #9abfe8;
    --primary-dark: #7aa3d1;
    --primary-light: #e8f2fc;
    --success: #27ae60;
    --error: #e74c3c;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #e0e0e0;
    --bg: #ffffff;
    --bg-gray: #f8f9fa;
}

* { box-sizing: border-box; }

.room-booking-container {
    max-width: 850px;
    margin: 40px auto;
    padding: 0;
    background: var(--bg);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
}

/* Header */
.booking-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 32px 40px;
    text-align: center;
    color: white;
}

.booking-header h2 {
    margin: 0 0 8px 0;
    font-size: 32px;
    font-weight: 700;
}

.room-capacity {
    font-size: 16px;
    opacity: 0.95;
    font-weight: 500;
}

/* Steps */
.booking-steps {
    display: flex;
    padding: 30px 40px;
    background: var(--bg-gray);
    position: relative;
    justify-content: space-between;
}

.booking-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 15%;
    right: 15%;
    height: 3px;
    background: var(--border);
    transform: translateY(-50%);
    z-index: 0;
}

.booking-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--border);
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: var(--text-light);
    transition: all 0.3s;
}

.booking-step.active .step-circle {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(154, 191, 232, 0.4);
}

.booking-step.completed .step-circle {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step-label {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 600;
}

.booking-step.active .step-label {
    color: var(--primary);
}

/* Form Container */
.form-step {
    display: none;
    padding: 40px;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.4s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Selectors */
.calendar-selector {
    margin-bottom: 32px;
}

.month-year-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 500px;
    margin: 0 auto;
}

.selector-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
}

.selector-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 16px;
    color: var(--text);
    background: var(--bg);
    cursor: pointer;
    transition: all 0.3s;
}

.selector-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* Hours Grid */
.hours-selector {
    margin-bottom: 32px;
}

.hours-selector > label {
    display: block;
    margin-bottom: 16px;
    color: var(--text);
    font-weight: 700;
    font-size: 18px;
}

.hours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.hour-option {
    padding: 16px 12px;
    border: 2px solid var(--border);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg);
    font-weight: 600;
    font-size: 15px;
}

.hour-option:hover:not(.disabled) {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.hour-option.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(154, 191, 232, 0.4);
}

.hour-option.disabled {
    background: var(--bg-gray);
    color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.5;
}

.hour-option small {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    opacity: 0.9;
}

.pricing-note {
    background: var(--primary-light);
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    color: var(--text);
    border-left: 4px solid var(--primary);
}

/* Calendar */
.date-picker-container > label {
    display: block;
    margin-bottom: 16px;
    color: var(--text);
    font-weight: 700;
    font-size: 18px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    background: var(--bg-gray);
    padding: 16px;
    border-radius: 12px;
}

.calendar-day-header {
    text-align: center;
    padding: 8px;
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg);
    font-weight: 600;
    font-size: 15px;
}

.calendar-day:hover:not(.disabled):not(.booked):not(.other-month) {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: scale(1.05);
}

.calendar-day.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(154, 191, 232, 0.4);
}

.calendar-day.booked {
    background: #ffe5e5;
    border-color: #ffcccc;
    color: #999;
    cursor: not-allowed;
    position: relative;
}

.calendar-day.booked::after {
    content: '✕';
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 11px;
    color: var(--error);
}

.calendar-day.disabled,
.calendar-day.other-month {
    background: var(--bg-gray);
    color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.4;
}

/* Time Slots */
.time-slots-container {
    margin-top: 32px;
}

.time-slots-container > label {
    display: block;
    margin-bottom: 16px;
    color: var(--text);
    font-weight: 700;
    font-size: 18px;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.time-slot {
    padding: 14px 12px;
    border: 2px solid var(--border);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg);
    font-weight: 600;
}

.time-slot:hover:not(.booked):not(.disabled) {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
}

.time-slot.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.time-slot.booked {
    background: #ffe5e5;
    border-color: #ffcccc;
    color: #999;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Forms */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 16px;
    color: var(--text);
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.form-group input.error {
    border-color: var(--error);
}

.error-message {
    color: var(--error);
    font-size: 13px;
    margin-top: 6px;
    display: none;
}

.required {
    color: var(--error);
}

/* Payment */
.payment-methods > label {
    display: block;
    margin-bottom: 16px;
    color: var(--text);
    font-weight: 700;
    font-size: 18px;
}

.payment-option {
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.payment-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.payment-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.payment-option input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

/* Summary */
.booking-summary {
    background: var(--bg-gray);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.booking-summary h3 {
    margin: 0 0 20px 0;
    color: var(--text);
    font-size: 22px;
    font-weight: 700;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}

.summary-row:last-child {
    border: none;
    padding-top: 16px;
    margin-top: 8px;
    border-top: 2px solid var(--border);
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

/* Buttons */
.button-group {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.btn {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(154, 191, 232, 0.4);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-prev { flex: 0.4; }
.btn-next, .btn-submit { flex: 0.6; }

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-error {
    background: #ffe5e5;
    color: var(--error);
    border: 2px solid var(--error);
}

.alert-success {
    background: #d4edda;
    color: var(--success);
    border: 2px solid var(--success);
}

/* Confirmation */
.confirmation-screen {
    text-align: center;
    padding: 60px 40px;
}

.confirmation-icon {
    width: 100px;
    height: 100px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 50px;
    color: white;
    box-shadow: 0 8px 24px rgba(39, 174, 96, 0.3);
}

.confirmation-screen h3 {
    font-size: 28px;
    margin-bottom: 16px;
    color: var(--text);
}

.confirmation-details {
    background: var(--bg-gray);
    padding: 24px;
    border-radius: 12px;
    margin: 24px 0;
    text-align: left;
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .room-booking-container {
        margin: 20px;
        border-radius: 12px;
    }
    
    .booking-header {
        padding: 24px 20px;
    }
    
    .booking-header h2 {
        font-size: 24px;
    }
    
    .form-step {
        padding: 24px 20px;
    }
    
    .booking-steps {
        padding: 20px;
    }
    
    .step-label {
        font-size: 12px;
    }
    
    .month-year-selector {
        grid-template-columns: 1fr;
    }
    
    .hours-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn-prev, .btn-next, .btn-submit {
        flex: 1;
    }
}

/* ========================================
   NEW FIELDS STYLES - v1.0.4
   ======================================== */

/* ID Type Options */
.id-type-options,
.event-type-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg);
    font-weight: 500;
}

.checkbox-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.checkbox-option input:checked + span {
    color: var(--primary);
}

.checkbox-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s;
    background: var(--bg-gray);
}

.file-upload-wrapper:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-info {
    pointer-events: none;
}

.file-upload-info span {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.file-upload-info small {
    color: var(--text-light);
    font-size: 13px;
}

/* Other Event Input */
.other-event-input {
    margin-top: 12px;
}

.other-event-input input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
}

.other-event-input input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* Guest Numbers */
.guest-numbers-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 8px;
}

.guest-field label {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 6px;
    font-weight: 500;
}

.guest-field input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 16px;
    text-align: center;
    font-weight: 600;
}

.guest-field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* Yes/No Options */
.yes-no-options {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.radio-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.radio-option input:checked + span {
    color: var(--primary);
}

.radio-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Payment Summary Section */
.payment-summary-section {
    background: var(--bg-gray);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    border: 2px solid var(--border);
}

.payment-summary-section h4 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: var(--text);
    font-weight: 700;
}

.cost-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.cost-row.advance-row {
    padding: 12px 0;
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
}

.cost-label {
    font-weight: 600;
    color: var(--text);
    font-size: 15px;
}

.cost-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.remaining-value {
    color: var(--primary);
    font-size: 20px;
}

.advance-input-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    max-width: 150px;
}

.currency-prefix {
    font-weight: 700;
    color: var(--text);
    font-size: 16px;
}

.advance-input-wrapper input {
    border: none;
    background: transparent;
    width: 80px;
    font-size: 16px;
    font-weight: 600;
    text-align: right;
    padding: 0;
}

.advance-input-wrapper input:focus {
    outline: none;
}

/* Terms Checkbox */
.terms-group {
    margin-top: 24px;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.terms-checkbox input {
    width: 22px;
    height: 22px;
    accent-color: var(--primary);
    margin-top: 2px;
}

.terms-text {
    font-size: 15px;
    color: var(--text);
    line-height: 1.5;
}

.terms-link {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 600;
}

.terms-link:hover {
    color: var(--primary-dark);
}

.terms-content {
    margin-top: 16px;
}

.terms-box {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    max-height: 250px;
    overflow-y: auto;
}

.terms-box h5 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: var(--text);
}

.terms-box ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.8;
}

.terms-box li {
    margin-bottom: 8px;
}

/* Form Help Text */
.form-help {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 6px;
}

/* Textarea */
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 16px;
    color: var(--text);
    transition: all 0.3s;
    resize: vertical;
    font-family: inherit;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* Summary Styles for Advance Payment */
.summary-row.total-row {
    border-bottom: 2px solid var(--border);
    padding-bottom: 16px;
}

.summary-row.advance-row {
    color: var(--text-light);
    font-size: 14px;
}

.summary-row.remaining-row.highlight {
    background: var(--primary-light);
    margin: 0 -24px;
    padding: 16px 24px;
    border-radius: 0 0 12px 12px;
    border: none;
}

.summary-row.remaining-row.highlight .summary-value {
    color: var(--primary);
    font-size: 22px;
}

/* File Selected State */
.file-upload-wrapper.has-file {
    border-color: var(--success);
    background: #d4edda;
}

.file-upload-wrapper.has-file .file-upload-info span {
    color: var(--success);
}

/* Responsive */
@media (max-width: 768px) {
    .id-type-options,
    .event-type-options {
        flex-direction: column;
    }
    
    .checkbox-option {
        width: 100%;
    }
    
    .guest-numbers-row {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .yes-no-options {
        flex-direction: row;
    }
    
    .radio-option {
        flex: 1;
        justify-content: center;
    }
    
    .cost-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .advance-input-wrapper {
        max-width: 100%;
        width: 100%;
    }
    
    .advance-input-wrapper input {
        flex: 1;
        width: auto;
    }
}