/* Reset & Base Styles for Booking Forms */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-image: linear-gradient(to right, #d7d2cc 0%, #304352 100%);
    color: #333;
    min-height: 100vh;
    padding-top: 70px;
    overflow-x: hidden;
}

/* Navbar - Mobile First */
.navbar {
    background-color: rgba(0, 0, 0, 0.95) !important;
    backdrop-filter: blur(10px);
    height: 60px;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.navbar-brand {
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white !important;
    text-decoration: none;
}

.navbar-brand:hover {
    color: #ffd700 !important;
}

.navbar-brand img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.navbar .btn-outline-light {
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
}

/* Main Container - Mobile First */
.container {
    padding: 0 1rem;
}

section.container {
    margin-top: 1rem !important;
    padding-top: 1rem !important;
}

.row {
    margin: 0;
}

.col-lg-8 {
    padding: 0;
}

/* Card - Mobile Optimized */
.card {
    border: none;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Card Header - Mobile */
.card-header {
    padding: 1.2rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.card-header h2 {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.card-header p {
    font-size: 0.9rem;
    margin-bottom: 0;
    opacity: 0.95;
}

/* Card Body - Mobile */
.card-body {
    padding: 1.5rem 1rem;
}

/* Traffic Light - Mobile Optimized */
.traffic-light {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 0 auto 1.5rem;
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    width: fit-content;
}

.light {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    opacity: 0.4;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.red-light {
    background-color: #ff4757;
}
.yellow-light {
    background-color: #ffa502;
}
.green-light {
    background-color: #2ed573;
}

.active {
    opacity: 1;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

/* Alerts - Mobile Optimized */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.alert h5,
.alert h6 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.alert ul {
    padding-left: 1.5rem;
    margin-bottom: 0;
}

.alert ul li {
    margin-bottom: 0.3rem;
}

.alert hr {
    margin: 0.8rem 0;
    opacity: 0.3;
}

.alert small {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Form Styles - Mobile First */
.row.g-3 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

.col-md-6,
.col-12 {
    padding: 0 0.5rem;
    margin-bottom: 1rem;
}

/* Form Labels */
.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #2d3748;
    display: block;
}

/* Form Controls - Mobile Optimized */
.form-control,
.form-select {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.98);
    transition: all 0.3s ease;
    width: 100%;
    height: auto;
    min-height: 48px; /* Touch-friendly minimum */
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background: white;
    outline: none;
}

.form-control.text-end,
.form-select.text-end {
    text-align: right;
    direction: rtl;
}

/* Input Placeholder */
.form-control::placeholder {
    color: #a0aec0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Form Text */
.form-text {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 0.3rem;
    text-align: right;
    direction: rtl;
}

/* Validation Styles */
.is-invalid {
    border-color: #f56565 !important;
    box-shadow: 0 0 0 0.2rem rgba(245, 101, 101, 0.25) !important;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #f56565;
    text-align: right;
    direction: rtl;
}

/* Availability Info */
#availabilityInfo {
    border-radius: 10px;
    padding: 0.8rem;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

#availabilityInfo .d-flex {
    align-items: center;
    gap: 0.5rem;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.1em;
}

/* Buttons - Mobile Optimized */
.btn {
    border-radius: 10px;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px; /* Touch-friendly */
    cursor: pointer;
}

.btn:hover,
.btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-lg {
    padding: 14px 25px;
    font-size: 1rem;
    min-height: 52px;
}

.btn i {
    font-size: 0.9rem;
}

/* Submit Button Container */
.text-center.mt-4 {
    margin-top: 1.5rem !important;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
}

/* Small Mobile Styles */
@media (max-width: 380px) {
    body {
        padding-top: 60px;
    }

    .navbar {
        height: 50px;
        padding: 0.3rem 0.5rem;
    }

    .navbar-brand {
        font-size: 0.8rem;
    }

    .navbar-brand img {
        width: 24px;
        height: 24px;
    }

    .container {
        padding: 0 0.5rem;
    }

    .card-header {
        padding: 1rem 0.8rem;
    }

    .card-header h2 {
        font-size: 1.2rem;
    }

    .card-header p {
        font-size: 0.8rem;
    }

    .card-body {
        padding: 1rem 0.8rem;
    }

    .traffic-light {
        gap: 6px;
        padding: 6px 12px;
        margin-bottom: 1rem;
    }

    .light {
        width: 16px;
        height: 16px;
    }

    .col-md-6,
    .col-12 {
        padding: 0 0.3rem;
        margin-bottom: 0.8rem;
    }

    .form-control,
    .form-select {
        padding: 10px 12px;
        font-size: 0.9rem;
        min-height: 44px;
    }

    .form-label {
        font-size: 0.85rem;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
        min-height: 44px;
    }

    .btn-lg {
        padding: 12px 20px;
        font-size: 0.95rem;
        min-height: 48px;
    }

    .alert {
        padding: 0.8rem;
        font-size: 0.85rem;
    }

    .text-center.mt-4 {
        margin-top: 1rem !important;
        gap: 0.6rem;
    }
}

/* Medium Mobile */
@media (min-width: 381px) and (max-width: 767px) {
    .text-center.mt-4 {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .btn {
        flex: 0 0 auto;
        min-width: 140px;
    }
}

/* Tablet Portrait */
@media (min-width: 768px) {
    body {
        padding-top: 80px;
    }

    .navbar {
        height: 70px;
        padding: 0.5rem 2rem;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    .navbar-brand img {
        width: 35px;
        height: 35px;
    }

    .container {
        padding: 0 1.5rem;
        max-width: 1200px;
        margin: 0 auto;
    }

    section.container {
        margin-top: 2rem !important;
        padding-top: 2rem !important;
    }

    .card-header {
        padding: 2rem;
    }

    .card-header h2 {
        font-size: 1.8rem;
    }

    .card-header p {
        font-size: 1rem;
    }

    .card-body {
        padding: 2rem;
    }

    .traffic-light {
        gap: 12px;
        padding: 12px 20px;
        margin-bottom: 2rem;
    }

    .light {
        width: 25px;
        height: 25px;
    }

    .col-md-6 {
        flex: 0 0 auto;
        width: 50%;
        padding: 0 0.75rem;
    }

    .col-12 {
        padding: 0 0.75rem;
    }

    .form-control,
    .form-select {
        padding: 14px 18px;
        font-size: 1rem;
        min-height: 50px;
    }

    .form-label {
        font-size: 1rem;
    }

    .btn {
        padding: 14px 25px;
        font-size: 1rem;
        min-height: 50px;
    }

    .btn-lg {
        padding: 16px 30px;
        font-size: 1.1rem;
        min-height: 54px;
    }

    .text-center.mt-4 {
        margin-top: 2rem !important;
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }

    .alert {
        padding: 1.2rem;
        font-size: 0.95rem;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .card-header h2 {
        font-size: 2rem;
    }

    .traffic-light {
        gap: 15px;
        padding: 15px 25px;
    }

    .light {
        width: 30px;
        height: 30px;
    }

    .card:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    }

    .col-lg-8 {
        flex: 0 0 auto;
        width: 66.66666667%;
        max-width: 700px;
        margin: 0 auto;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding-top: 50px;
    }

    .navbar {
        height: 45px;
    }

    .card-header {
        padding: 1rem;
    }

    .card-header h2 {
        font-size: 1.3rem;
    }

    .card-body {
        padding: 1rem;
    }

    .traffic-light {
        margin-bottom: 1rem;
        padding: 6px 12px;
    }

    .text-center.mt-4 {
        margin-top: 1rem !important;
    }

    .row.g-3 {
        --bs-gutter-y: 0.8rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white !important;
        color: black !important;
        padding-top: 0;
    }

    .navbar,
    .traffic-light {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .btn {
        display: none !important;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }

    .form-control,
    .form-select {
        border: 2px solid #000;
    }

    .btn {
        border: 2px solid currentColor;
    }

    .traffic-light {
        border: 2px solid #fff;
    }
}

/* Focus Styles for Accessibility */
.form-control:focus,
.form-select:focus,
.btn:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

/* Form validation animations */
.is-invalid {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%,
    20%,
    40%,
    60%,
    80% {
        transform: translateX(0);
    }
    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }
}
