/* Shared/Base variables from main site concept */
:root {
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent: #5e6d8c;
    /* Example accent */
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
}

body {
    margin: 0;
    padding: 20px;
    font-family: "sofia-pro", sans-serif;
    color: var(--text-main);
    background: transparent;
    /* Transparent so it blends if iframe is transp, but normally index has bg */
    /* If iframe needs its own background, we can set it, but usually we want it to blend */
    overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.departure-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}



/* Search Section */
.search-section {
    position: relative;
    z-index: 10;
}

.input-wrapper input {
    width: 100%;
    /* Fix for padding making element wider than container */
    box-sizing: border-box;
    padding: 15px 20px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: 1.1rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.input-wrapper input:focus {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 10px;
    background: #1a1a1a;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    max-height: 200px;
    /* actually let's make it taller if needed */
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.search-results.hidden {
    display: none;
}

.search-result-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Filter Section */
.filter-section {
    display: flex;
    justify-content: center;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.toggle-pill {
    cursor: pointer;
    user-select: none;
}

.toggle-pill input {
    display: none;
}

.toggle-pill span {
    display: block;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.toggle-pill input:checked+span {
    background: #fff;
    color: #000;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

/* Departures Board */
.departures-board {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    min-height: 200px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.board-header {
    display: grid;
    grid-template-columns: 80px 100px 1fr 60px;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.board-rows {
    display: flex;
    flex-direction: column;
}

.departure-row {
    display: grid;
    grid-template-columns: 80px 100px 1fr 60px;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    align-items: center;
    transition: background 0.2s;
    font-variant-numeric: tabular-nums;
}

.departure-row:last-child {
    border-bottom: none;
}

.departure-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Column Styling */
.col-time {
    font-weight: 700;
    color: #fff;
}

.col-line {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    /* Space between icon and text */
}

.transport-icon {
    height: 20px;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}

.col-dest {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
}

.col-plat {
    text-align: right;
    font-weight: 600;
}

.empty-state {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
}

.status-message {
    text-align: center;
    min-height: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.departure-row {
    animation: fadeIn 0.3s ease forwards;
}

/* Responsive */
@media (max-width: 600px) {

    .board-header,
    .departure-row {
        grid-template-columns: 60px 70px 1fr 40px;
        font-size: 0.85rem;
        padding: 12px 10px;
    }
}

/* Fullscreen Button */
.fullscreen-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Header & Clock */
.header-row {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.digital-clock {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
}

.hidden {
    display: none !important;
}

/* Fullscreen Mode Styles */
body.is-fullscreen {
    background: #000;
    /* Dark background for monitor feel */
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.is-fullscreen .departure-container {
    max-width: 95vw;
    width: 95vw;
    height: 95vh;
    display: flex;
    flex-direction: column;
}

body.is-fullscreen h2 {
    font-size: 3rem;
    margin-bottom: 40px;
    color: #fff !important;
}

body.is-fullscreen .search-section,
body.is-fullscreen .filter-section,
body.is-fullscreen .status-message,
body.is-fullscreen .fullscreen-btn {
    display: none;
}

body.is-fullscreen .fullscreen-btn:hover {
    opacity: 1;
}

body.is-fullscreen .departures-board {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    font-size: 1.5rem;
    /* Larger text */
    background: rgba(255, 255, 255, 0.05);
    /* slightly lighter than black */
}

body.is-fullscreen .board-header {
    font-size: 1.2rem;
    padding: 20px 30px;
}

body.is-fullscreen .departure-row {
    padding: 20px 30px;
    font-size: 1.3rem;
}

body.is-fullscreen .clock {
    display: block;
}

body.is-fullscreen .digital-clock.hidden {
    display: block !important;
    /* Force show clock in FS */
}

body.is-fullscreen .search-results {
    display: none !important;
}

/* Adjust columns for large text */
body.is-fullscreen .board-header,
body.is-fullscreen .departure-row {
    grid-template-columns: 250px 400px 1fr 200px;
}

body.is-fullscreen .departure-row:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

body.is-fullscreen .transport-icon {
    height: 32px;
    /* Bigger icons */
}