:root {
    --primary-blue: #3a5a9a;
    --secondary-blue: #1a2a4a;
    --light-blue: #e3f2fd;
    --dark-blue: #004085;
    --navbar-height: 70px;
}

.report-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 280px;
    overflow-y: auto;
}

.report-chat-message {
    max-width: 80%;
    overflow-wrap: anywhere;
}

.report-chat-message.from-me {
    align-self: flex-end;
    background-color: #e8f5ee;
}

.report-chat-message.from-other {
    align-self: flex-start;
    background-color: #fff;
}

body {
    font-family: 'Helvetica', sans-serif;
    line-height: 1.6;
    color: #333;
}

.navbar {
    background: white !important;
         --seat-size: 44px;
         --seat-gap: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}
.nav-link:hover {
    color: var(--primary-blue) !important;
}

.dropdown-menu {
    background-color: white;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Seat picker styles */
.seat-row .seat-group { display: flex; gap: var(--seat-gap); }
.col-group { width: 116px; display: flex; justify-content: space-between; align-items: center; }

/* Adjust column labels: A and B to the right, C and D to the left */
.seat-header .col-group:first-of-type { transform: translateX(35px); }
.seat-header .col-group:last-of-type { transform: translateX(-35px); }

.logo {
    max-height: 60px;
    width: auto;
}

.hero {
    background-image: url('assets/image1.jpg');
    background-size: cover;
    background-position: center;
         width: var(--seat-size); /* match seat size so label centers over seat */
    position: relative;
    padding: 40px 0;
}



.hero .container {
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-family: 'Helvetica', sans-serif;
    font-weight: 700;
    color: white;
    animation: fadeInUp 1s ease-out;
}

.booking-form .form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    font-family: 'Helvetica', sans-serif;
}

.booking-form .form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(58, 90, 154, 0.25);
}

.booking-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.booking-form .form-label {
    font-weight: 600;
    color: #333;
}

.booking-form .input-group-text {
    background-color: var(--primary-blue);
    color: white;
    border: none;
}

.booking-form .btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Helvetica', sans-serif;
    transition: transform 0.3s ease;
}

.booking-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.discover {
    background-color: #f8f9fa;
}

.plan-card {
    background: var(--primary-blue);
    color: white;
    border-radius: 12px;
    padding: 24px;
    min-height: 420px;
    box-shadow: 0 8px 30px rgba(4, 21, 65, 0.12);
}

.plan-card h4,
.plan-card .form-label,
.plan-card .form-check-label {
    color: #ffffff;
}

.plan-card .form-control {
    border-radius: 8px;
    padding: 10px 12px;
    background: #ffffff;
    color: #0b1330;
}

.plan-card .input-group-text {
    background: #ffffff;
    color: var(--primary-blue);
    border: none;
}

.card-divider {
    height: 2px;
    width: 100%;
    background: rgba(255,255,255,0.18);
}

.seat-card .card-divider {
    background: rgba(4,36,62,0.06);
}

.service-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(4, 21, 65, 0.08);
    border: 1px solid #e9eef8;
    min-height: 420px;
}

.service-card h5 {
    font-weight: 700;
}

.active-service {
    background: linear-gradient(90deg, rgba(11,98,184,0.08), rgba(10,74,138,0.06));
    padding: 8px 12px;
    border-radius: 30px;
}

.badge {
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 20px;
}

.seat-card {
    background: var(--light-blue);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(4, 21, 65, 0.06);
    border: 1px solid #ddebff;
    min-height: 420px;
    color: #04243e;
}

.train-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.seat-maps {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Train selector improvements: space buttons and show train icon at left */
#trainSelector.train-selector { display: flex; gap: 10px; align-items: center; }
#trainSelector.train-selector .btn { padding-left: 10px; display:flex; align-items:center; gap:8px; }
#trainSelector.train-selector .train-btn-icon { width:20px; height:20px; margin-right:6px; }
/* extra separation: make Train 1 visually separated from others */
#trainSelector.train-selector .btn[data-train="1"] { margin-right: 18px; }

/* Keep active train button highlighted with their respective hover colors */
#trainSelector .btn.active[data-train="1"] {
    background-color: #0d6efd !important;
    color: white !important;
    border-color: #0d6efd !important;
}
#trainSelector .btn.active[data-train="2"] {
    background-color: #28a745 !important;
    color: white !important;
    border-color: #28a745 !important;
}
#trainSelector .btn.active[data-train="3"] {
    background-color: #dc3545 !important;
    color: white !important;
    border-color: #dc3545 !important;
}
#trainSelector .btn.active[data-train="4"] {
    background-color: #ffc107 !important;
    color: white !important;
    border-color: #ffc107 !important;
}
#trainSelector .btn.active[data-train="5"] {
    background-color: #6f42c1 !important;
    color: white !important;
    border-color: #6f42c1 !important;
}

/* make each train-map card visually separated */
.train-map { margin-bottom: 12px; }

.train-map {
    background: linear-gradient(180deg, #ffffff, #f7fbff);
    border-radius: 8px;
    padding: 18px;
    border: 1px solid #e6f0ff;
    width: 100%;
}

/* make train-map a flex container so the carriage can be centered while map stays full width */
.train-map { display: flex; justify-content: center; }

/* Left panel for Main Cabin */
.left-panel {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Right panel for seat info */
.right-panel {
    flex: 1;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border: 1px solid #e6f0ff;
}

.train-line {
    height: 18px;
    background: #cfe6ff;
    border-radius: 4px;
    margin: 8px 0 12px 0;
    position: relative;
}

.train-line::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -8px;
    width: 120px;
    height: 8px;
    background: linear-gradient(90deg, rgba(11,98,184,0.12), rgba(10,74,138,0.08));
    transform: translateX(-50%);
    border-radius: 4px;
}

/* Main cabin title */
.main-cabin {
    font-weight: 600;
    color: #6b7c8a;
    margin: 8px 0 12px 0;
    font-size: 1.6rem;
}

/* train side rails (top-down view decorative) */
.train-map {
    position: relative; /* contain pseudo-elements */
    overflow: hidden;   /* hide anything spilling out */
}

.train-map::before,
.train-map::after {
    display: none; /* hides those vertical lines */
}

    .rows-container { max-height: none; overflow: visible; }

    /* full-height vertical lines on both sides of the carriage */
    .carriage { position: relative; }
    .carriage::before, .carriage::after { content: ''; position: absolute; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg,#d8e6fb,#eaf6ff); }
    .carriage::before { left: -18px; }
    .carriage::after { right: -18px; }

.train-map::after { right: 8px; }

/* simplified seat visuals: plain colored boxes */
.seat-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 8px 8px 4px 4px;
    background-color: #f9f9f9;
    cursor: pointer;
    display: inline-block;
    margin: 2px;
    transition: all 0.3s ease;
    position: relative;
    vertical-align: middle;
}

.seat-btn::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 8px;
    background-color: inherit;
    border: 1px solid #ccc;
    border-radius: 50%;
    border-bottom: none;
}

.seat-btn.available::after {
    background-color: #e6f7ff;
    border-color: #91d5ff;
}

.seat-btn.selected::after {
    background-color: #1890ff;
    border-color: #1890ff;
}

.seat-btn.unavailable::after {
    background-color: #ffccc7;
    border-color: #ff7875;
}

/* Responsive seat sizes */
@media (max-width: 768px) {
    .seat-btn {
        width: 32px;
        height: 32px;
        margin: 2px;
    }
}

@media (max-width: 576px) {
    .seat-btn {
        width: 28px;
        height: 28px;
        margin: 1px;
    }
}

.seat-btn.available {
    background-color: #e6f7ff;
    border-color: #91d5ff;
}

.seat-btn.selected {
    background-color: #1890ff;
    border-color: #1890ff;
    color: white;
}

.seat-btn.unavailable {
    background-color: #ffccc7;
    border-color: #ff7875;
    cursor: not-allowed;
}

.seat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.seat-btn.available:hover {
    background-color: #bae7ff;
}

.seat-btn.selected:hover {
    background-color: #40a9ff;
}

.seat-btn.unavailable:hover {
    transform: none;
    box-shadow: none;
}

.seat-star { display: none; }

 /* left and right row numbers next to seat groups */
.seat-row .row-num-left, .seat-row .row-num-right { width: 36px; display:flex; align-items:center; justify-content:center; color: #586777; font-weight:700; }

.door-box { display: none !important; }
.door-slot { display: none !important; }
.door-vertical { display: none !important; }

 /* exit rows style (striped) */
.exit-row { background: repeating-linear-gradient(135deg, rgba(220,53,69,0.06) 0, rgba(220,53,69,0.06) 10px, transparent 10px, transparent 20px); border: 1px solid rgba(220,53,69,0.12); }

.seat-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }

.legend { padding: 6px 10px; border-radius: 8px; font-weight: 600; }
.legend.available { background: #e6fff0; color: #0b3d22; border: 1px solid #28a745; }
.legend.selected { background: var(--primary-blue); color: white; border: 1px solid var(--primary-blue); }
.legend.unavailable { background: #ffe6e6; color: #5a1515; border: 1px solid #dc3545; }

.legend-list { gap: 12px; }
.legend-item { gap: 8px; }
.legend-box { width: 18px; height: 18px; border-radius: 4px; display: inline-block; }
.legend-box.available { background: #e6fff0; border: 1px solid #28a745; }
.legend-box.selected { background: var(--primary-blue); border: 1px solid var(--primary-blue); }
.legend-box.unavailable { background: #ffe6e6; border: 1px solid #dc3545; }
.legend-box.door { background: #f0f0f0; border: 1px solid #cfcfcf; }

/* carriage layout */
.carriage {
    padding: 10px 12px;
    max-width: 520px;
    margin: 0 auto;
}

/* subtle shadowing and rounded ends to mimic train cabin */
.carriage { padding: 10px 12px; max-width: 520px; margin: 0 auto; }

.seat-header, .seat-footer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.seat-body { max-width: 520px; margin: 0 auto; }

.row-label {
    width: 36px;
    text-align: center;
    color: #657789;
    font-weight: 600;
}

.col-label {
    width: 48px; /* roughly seats' outer width (seat + margins) to align letters above seats */
    text-align: center;
    color: #0b1330;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
    .col-label {
        width: var(--seat-size); /* match seat size so label centers over seat */
        text-align: center;
        color: #0b1330;
        font-weight: 700;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 0;
    }
}

.rows-container { max-height: none; overflow: visible; }

/* ensure aisle doesn't add extra visual gap in header/footer */
.seat-header .aisle, .seat-footer .aisle { width: 36px; height: 0; }
.seat-header .row-label { width: 52px; }

.door-divider { height: 18px; background: #f3f6f9; border-left: 4px solid #d8e6fb; border-right: 4px solid #d8e6fb; border-radius: 6px; }

 /* removed duplicate seat background/border rules so seat visuals come only from pseudo-elements and --seat-fill */

.door-row { display: flex; justify-content: center; }
.door-vertical { width: 16px; height: 40px; background: #f0f0f0; border: 2px solid #d8e6fb; border-radius: 4px; }

 /* container for double doors: place one near left seats and one near right seats */
.doors-container { width: 100%; padding: 0 8px; box-sizing: border-box; }
.doors-container .door-vertical { width: 16px; height: 44px; }
.door-row { padding: 6px 0; }

 /* chair icon styling for door indicators */
.door-icon {
    width: 20px;
    height: 20px;
    color: #6b7c93; /* subtle gray-blue */
    background: transparent;
}
.doors-container svg.door-icon { display: block; }

 /* slightly larger door icons for visual parity with airplane attachment */
.doors-container svg.door-icon { width: 20px; height: 20px; color: #6b7c93; }

 /* layout tweak: center row numbers between seat groups */
.seat-row { justify-content: center; }
.seat-row .seat-group { display: flex; gap: 12px; }
.row-label { width: 60px; text-align: center; }
.door-row .door-slot { width: 120px; display: flex; justify-content: center; margin: 0 6px; }

@media (max-width: 768px) {
    .col-label, .seat-row .seat { width: 32px; height: 32px; }
    .row-label { width: 28px; }
    .carriage { max-width: 100%; padding: 8px; }
    .train-map { padding: 12px; }
    .seat-header .row-label { width: 40px; }
    .doors-container .door-vertical { width: 12px; height: 32px; }
    .side-line { width: 2px; height: 32px; }
    .train-selector { flex-wrap: wrap; gap: 8px; }
    .train-selector .btn { padding: 6px 8px; font-size: 0.9rem; }
    .legend-list { flex-direction: column; gap: 8px; }
}

.train {
    border: 1px solid #eef3fb;
    padding: 12px;
    border-radius: 8px;
    background: #f8fbff;
}

.train h6 {
    margin: 0 0 8px 0;
}

.seats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.seat { padding: 0; background: transparent; border: 0; }

.seat.selected { outline: none; }

 /* keyboard focus styling for seats (accessibility) */
.seat:focus-visible { outline: 2px solid rgba(58,90,154,0.18); outline-offset: 4px; }

.seat.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.highlights {
    background-color: white;
}

.highlight-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
    padding: 20px;
}

.highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.social-icons a {
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #e9ecef !important;
}

.feature-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.feature-card h5 {
    margin-bottom: 10px;
}

footer {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    margin-top: auto;
}

.footer-logo {
    max-height: 100px;
    width: auto;
}

/* Ticket Styles for Booking Confirmation Modal */
.ticket {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 20px auto;
    border: 2px solid #e9ecef;
    position: relative;
    max-width: 400px;
}

.ticket::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -12px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    border: 2px solid #e9ecef;
    transform: translateY(-50%);
    z-index: 1;
}

.ticket::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -12px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    border: 2px solid #e9ecef;
    transform: translateY(-50%);
    z-index: 1;
}

.ticket-top {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    padding: 24px;
    color: white;
    text-align: center;
    position: relative;
}

.ticket-logo {
    height: 60px;
    width: auto;
    margin-bottom: 16px;
    filter: brightness(0) invert(1);
}

.stations {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.station-code {
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 32px;
    min-width: 100px;
    text-align: center;
    margin-bottom: -5px;
    line-height: 0.9;
}

.station-full {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    font-weight: 500;
    margin-top: -5px;
    line-height: 0.9;
}

.station-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ticket-line {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    margin: 12px 0;
}

.subway-icon {
    width: 32px;
    height: 32px;
    margin: 0 16px;
    filter: brightness(0) invert(1);
}

.station-names {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    opacity: 0.9;
}

.station-name {
    flex: 1;
    text-align: center;
    font-weight: 500;
}

.ticket-divider {
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    position: relative;
}

.ticket-divider::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    width: 16px;
    height: 16px;
    background: white;
    border: 4px solid var(--primary-blue);
    border-radius: 50%;
    transform: translateX(-50%);
}

.ticket-bottom {
    padding: 24px;
    background: white;
}

.ticket-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.grid-item {
    text-align: center;
}

.label {
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 600;
}

.value {
    font-size: 14px;
    font-weight: bold;
    color: #495057;
}

.ticket-gate {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.gate-text {
    font-weight: bold;
    color: var(--primary-blue);
    font-size: 14px;
}

.line-icon {
    background: var(--primary-blue);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 12px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .logo {
        max-height: 50px;
    }

    .hero {
        padding: 30px 0;
        text-align: left;
    }

    .hero h2 {
        font-size: 2.5rem;
    }

    .hero .col-lg-6 {
        margin-bottom: 30px;
    }

    .img-fluid {
        border-radius: 10px;
    }

    /* Responsive dropdown menus */
    #ridingMmsDropdown .dropdown-menu,
    #aboutDropdown .dropdown-menu,
    #alertsDropdown .dropdown-menu,
    #userNavItem .dropdown-menu {
        min-width: 90vw !important; /* Use viewport width for mobile */
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 90vw !important;
        max-width: none !important;
    }

    /* Adjust dropdown content for mobile */
    .custom-dropdown {
        padding: 1rem !important;
    }

    .icons-row {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .icon-item {
        margin: 0 !important;
    }

    .bottom-section .left-column {
        margin-right: 0 !important;
    }

    .bottom-section {
        flex-direction: column !important;
    }

    /* Make navbar links stack better on mobile */
    .navbar-nav .nav-item {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
    }

    /* Additional responsive fixes */
    .navbar-brand {
        font-size: 1.2rem;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
    }

    .booking-form {
        padding: 20px;
    }

    .booking-form .btn-primary {
        padding: 10px;
        font-size: 0.9rem;
    }

    .card {
        margin-bottom: 1rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

    .carousel-caption h5 {
        font-size: 1rem;
    }

    .carousel-caption p {
        font-size: 0.875rem;
    }

    footer .container {
        padding: 1rem 0;
    }

    footer small {
        font-size: 0.875rem;
    }
}
