/* --- 1. Variables & Reset --- */
:root {
    --brand-primary: #8C6A5D; /* Warm coffee brown */
    --brand-hover: #735549;
    --bg-color: #F7F5F2; /* Light cream */
    --surface-color: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #dcdcdc;
    --error-color: #dc3545;
    --error-bg: #fff3f3;
    --success-color: #28a745;
    --success-bg: #e8f5e9;
    --focus-ring: rgba(140, 106, 93, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding: 20px 15px;
}

/* --- 2. Main Container & Header --- */
.reservation-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--surface-color);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.form-header {
    background: var(--brand-primary);
    color: white;
    padding: 30px 25px;
    text-align: center;
}

.form-header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.form-header p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* --- 3. Progress Bar --- */
.progress-container {
    width: 100%;
    background-color: #e9ecef;
    height: 6px;
    /* Removed top radius so it sits flush under the header/feedback */
    margin-bottom: 25px;
}

.progress-bar {
    height: 100%;
    background-color: var(--brand-primary);
    width: 33.33%; /* Defaults to Step 1 */
    transition: width 0.4s ease;
}

/* --- 4. Feedback Notifications (Fixed Margins) --- */
.feedback-box {
    /* Standardized margins so it doesn't touch the progress bar */
    margin: 20px 25px; 
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    animation: fadeIn 0.3s ease-in-out;
}

.error-box {
    background-color: var(--error-bg);
    color: var(--error-color);
    border: 1px solid #ffcaca;
}

.success-box {
    background-color: var(--success-bg);
    color: var(--success-color);
    border: 1px solid #c8e6c9;
}

/* --- 5. Wizard Steps & Layout --- */
.reservation-form {
    padding: 0 25px 25px 25px;
}

.wizard-step {
    display: none;
    animation: slideInFade 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.wizard-step.active {
    display: block;
}

.step-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--brand-primary);
    text-align: center;
}

.form-row {
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 15px; /* Added slight bottom margin for mobile stacking */
}

/* --- 6. Form Inputs & Typography --- */
label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

input, select, textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #fafafa;
    color: var(--text-main);
    transition: all 0.2s ease;
    font-family: inherit;
    /* Prevents iOS zooming on input focus */
    appearance: none;
    -webkit-appearance: none; 
}

/* Custom dropdown arrow for selects */
select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    background-color: #fff;
    box-shadow: 0 0 0 3px var(--focus-ring);
}

input:disabled, select:disabled {
    background-color: #e9ecef;
    color: #999;
    cursor: not-allowed;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* --- 7. Buttons --- */
.button-group {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-next, .btn-back, .btn-submit {
    padding: 16px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s, transform 0.1s;
    flex: 1;
    text-align: center;
}

.btn-next, .btn-submit {
    background-color: var(--brand-primary);
    color: white;
    border: none;
}

.btn-back {
    background-color: #f1f1f1;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.btn-next:hover, .btn-submit:hover {
    background-color: var(--brand-hover);
}

.btn-back:hover {
    background-color: #e2e2e2;
}

.btn-next:active, .btn-back:active, .btn-submit:active {
    transform: scale(0.98);
}

.btn-submit:disabled {
    background-color: #bfaea8;
    cursor: not-allowed;
    transform: none;
}

/* --- 8. Helper Elements --- */
.dynamic-notice {
    background: #fdfaf5; 
    border-left: 4px solid var(--brand-primary); 
    padding: 12px; 
    border-radius: 6px; 
    font-size: 0.85rem; 
    font-weight: 600; 
    color: #555;
    margin-top: 10px;
}

.terms-text {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 15px;
}

/* --- 9. Animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInFade {
    from { opacity: 0; transform: translateX(15px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- 10. Responsive PC Layout --- */
@media (min-width: 600px) {
    .split-mobile {
        display: flex;
        gap: 20px;
    }
    
    .input-group {
        margin-bottom: 0; /* Reset mobile margin for flex layout */
    }
    
    body {
        padding: 50px 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
    }
}