@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

:root {
    --brand-blue: #003177;
    --brand-blue-light: #0047ab;
    --accent-color: #f0541a;
    --accent-dark: #c94112;
    --surface-color: rgba(255, 255, 255, 0.94);
    --border-color: #dbe2e8;
    --text-color: #202b34;
    --text-light: #687682;
    --soft-blue: #eef4fb;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-image:
        linear-gradient(135deg, rgba(0, 49, 119, 0.68), rgba(32, 43, 52, 0.28)),
        url('background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    backdrop-filter: blur(5px);
}

.container {
    background-color: var(--surface-color);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid rgba(219, 226, 232, 0.9);
    box-shadow: 0 24px 70px rgba(11, 36, 72, 0.24);
    box-sizing: border-box;
    width: 100%;
    max-width: 650px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    max-width: 180px;
    margin-bottom: 15px;
    padding: 10px 14px;
    border-radius: 0;
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-light) 100%);
}

h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: var(--brand-blue);
}

header p {
    color: var(--text-light);
    font-size: 16px;
    margin: 0;
}

.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-weight: 600; }

input[type="text"], input[type="tel"], select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.16);
}

/* Date Slider */
.date-slider-container {
    position: relative;
    overflow: hidden;
    padding: 0 30px;
}

.date-slider {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    overflow-x: scroll;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}
.date-slider::-webkit-scrollbar { display: none; } /* Chrome, Safari, Opera */

.date-slide {
    flex: 0 0 80px;
    padding: 10px;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.date-slide.selected {
    background-color: var(--brand-blue);
    color: white;
    border-color: var(--brand-blue);
}

.date-weekday {
    display: block;
    color: var(--text-light);
    font-size: 12px;
    margin-bottom: 3px;
    text-transform: uppercase;
}
.date-slide.selected .date-weekday { color: rgba(255, 255, 255, 0.78); }
.date-day { display: block; font-weight: 600; }
.date-month { font-size: 14px; text-transform: uppercase; }

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
#arrow-left { left: 0; }
#arrow-right { right: 0; }

/* Time Slots */
.time-slots-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.time-slot {
    min-height: 56px;
    padding: 8px 6px;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.time-slot:hover:not(.disabled) {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(240, 84, 26, 0.16);
}

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

.slot-time,
.slot-meta {
    display: block;
}

.slot-meta {
    margin-top: 4px;
    color: var(--text-light);
    font-size: 12px;
    font-weight: 500;
}

.time-slot.selected .slot-meta {
    color: rgba(255, 255, 255, 0.82);
}

.time-slot.disabled {
    background-color: #f4f7fa;
    color: #ced4da;
    cursor: not-allowed;
}

.time-slot.disabled .slot-time {
    text-decoration: line-through;
}

.time-slot.disabled .slot-meta {
    color: #adb5bd;
}

.slots-message {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0;
    padding: 14px;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    text-align: center;
}

.slots-message.loading {
    border-color: rgba(0, 49, 119, 0.28);
    color: var(--brand-blue);
    background: var(--soft-blue);
}

.slots-message.error {
    border-color: rgba(220, 53, 69, 0.35);
    color: #b02a37;
}

.bot-trap {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(240, 84, 26, 0.28);
    transition: background-color 0.3s, transform 0.2s;
}

.submit-btn:hover:not(:disabled) {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.submit-btn:disabled {
    background: #c9d3dc;
    box-shadow: none;
    cursor: not-allowed;
}

footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-light);
}

.success-card {
    padding: 20px;
    border: 1px solid rgba(0, 49, 119, 0.18);
    border-radius: 8px;
    background: var(--soft-blue);
}

.success-card h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.success-card p {
    margin: 8px 0 0;
}

@media (max-width: 560px) {
    body {
        padding: 10px;
        background-attachment: scroll;
    }

    .container {
        width: calc(100% - 14px);
        padding: 24px 18px;
    }

    h1 {
        font-size: 24px;
    }

    .time-slots-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
