.sd-search-box,
.sd-station-list,
.sd-board {
    max-width: 960px;
    margin: 1rem auto;
    padding: 1rem 1rem 0.1rem 1rem;
    background: #111;
    border-radius: 20px;
    color: #f3d36b;
    font-family: "Courier New", monospace;
    box-sizing: border-box;
}

.sd-search-box label,
.sd-station-list h3,
.sd-board h3 {
    display: block;
    margin: 0 0 0.6rem 0 !important;
    color: #f3d36b;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: bold;
    font-size: 1rem;
    text-shadow: 0 1px 2px #000;
}

.sd-search-row {
    display: flex;
    gap: 6px;
}

.sd-search-row input {
    flex: 1;
    padding: 9px 10px;
    background: #050505 !important;
    color: #f5f5f5 !important;
    border: 1px solid #333 !important;
    border-radius: 3px;
    font-family: "Courier New", monospace;
    font-size: 1rem;
    min-height: 42px;
    box-sizing: border-box;
}

.sd-search-row input::placeholder {
    color: #bfa54c !important;
    opacity: 1;
}

.sd-search-row input:focus {
    outline: none;
    border-color: #f3d36b !important;
    box-shadow: 0 0 12px rgba(243, 211, 107, 0.3);
}

.sd-search-row button,
.sd-station-button {
    padding: 9px 12px;
    background: linear-gradient(
        to bottom,
        #1a1a1a 0%,
        #050505 50%,
        #151515 51%,
        #000 100%
    );
    color: #f3d36b;
    border: 1px solid #333;
    border-radius: 3px;
    cursor: pointer;
    font-family: "Courier New", monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.15s ease;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -1px 0 rgba(0, 0, 0, 0.9);
}

.sd-search-row button:hover,
.sd-station-button:hover {
    background: #222;
    color: #ffe08a;
}

.sd-results {
    margin-top: 0.75rem;
}

.sd-station-list {
    margin-top: 0.5rem;
}

.sd-station-button {
    display: block;
    width: 100%;
    margin-bottom: 5px;
    text-align: left;
    font-size: 1rem;
}

.sd-departures-header,
.sd-departures li {
    display: grid !important;
    grid-template-columns: 80px 125px minmax(0, 1fr) 60px;
    column-gap: 6px;
    align-items: center;
    box-sizing: border-box;
}

.sd-departures-header {
    padding: 6px 0 !important;
    margin: 0 !important;
    color: #c9b05b;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    font-weight: bold;
}

.sd-departures {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none;
    background: transparent;
    overflow: hidden;
}

.sd-departures li {
    position: relative;
    margin: 0 !important;
    padding: 1px 0 !important;
    border-bottom: none;
}

.sd-departures li::before {
    display: none !important;
    content: none !important;
}

.sd-departures li::marker {
    display: none !important;
    content: none !important;
}

.sd-time,
.sd-line,
.sd-destination,
.sd-platform {
    display: block;
    position: relative;
    padding: 3px 8px;
    background:
        linear-gradient(
            to bottom,
            #202020 0%,
            #0d0d0d 48%,
            #1a1a1a 49%,
            #050505 100%
        );
    border: 1px solid #8a7777;
    border-radius: 3px;
    color: #f3d36b;
    text-transform: uppercase;
    font-weight: bold;
    text-shadow: 0 1px 2px #000;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -2px 0 rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.sd-time::after,
.sd-line::after,
.sd-destination::after,
.sd-platform::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.sd-platform {
    text-align: center;
}

.sd-destination {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sd-platform:empty::before {
    content: "\00a0";
}


/* Horloge */

.sd-clock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    vertical-align: middle;
}

.sd-clock-face {
    position: relative;
    width: 38px;
    height: 38px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #111;
    box-shadow:
        inset 0 0 8px #000,
        0 0 0 2px #333;
}

.sd-clock-hour,
.sd-clock-minute,
.sd-clock-second {
    position: absolute;
    left: 50%;
    bottom: 50%;
    transform-origin: bottom center;
    border-radius: 2px;
}

.sd-clock-hour {
    width: 4px;
    height: 10px;
    background: #fff;
    margin-left: -2px;
}

.sd-clock-minute {
    width: 2px;
    height: 14px;
    background: #fff;
    margin-left: -1px;
}

.sd-clock-second {
    width: 1px;
    height: 17px;
    background: #ff4444;
    margin-left: 0;
}

.sd-clock-face::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    left: 50%;
    top: 50%;
    margin-left: -3px;
    margin-top: -3px;
}

.sd-source {
    margin-bottom: 1px !important;
    font-size: 10px;
    opacity: 0.7;
}

.sd-board h3 .sd-station-name {
    display: inline-block;
    margin-top: 3px;
    font-size: 0.85em;
    opacity: 0.85;
    letter-spacing: 1px;
}


/* Mobile */

@media (max-width: 800px) {

    .widget:has(.sd-widget) {
        padding: 0 !important;
        margin: 0 !important;
        background: none !important;
        border: none !important;
        box-shadow: none !important;
    }

    .sd-widget,
    .sd-search-box,
    .sd-station-list,
    .sd-board {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 1px !important;
        padding: 0.5rem !important;
        border-radius: 0;
        box-sizing: border-box;
    }

    .sd-search-box label,
    .sd-station-list h3,
    .sd-board h3 {
        font-size: 1.1rem !important;
        letter-spacing: 1px;
        line-height: 1.25;
        margin-bottom: 0.5rem !important;
    }

    .sd-search-row {
        flex-direction: column;
        gap: 5px;
    }

    .sd-search-row input,
    .sd-search-row button {
        width: 100%;
        min-height: 40px;
        font-size: 1.05rem;
        padding: 7px 9px;
        box-sizing: border-box;
    }

    .sd-departures-header {
        display: none !important;
    }

    .sd-departures {
        width: 100%;
    }

    .sd-departures li {
        display: grid !important;

        grid-template-columns: 70px 90px 1fr;

        grid-template-areas:
            "destination destination destination"
            "time line platform";

        gap: 2px;

        width: 100%;

        padding: 1px 0 !important;

        align-items: center;

        box-sizing: border-box;
    }

    .sd-time {
        grid-area: time;
    }

    .sd-line {
        grid-area: line;
    }

    .sd-platform {
        grid-area: platform;
        text-align: right;
    }

    .sd-destination {
        grid-area: destination;

        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;

        margin-top: 1px;
    }

    .sd-time,
    .sd-line,
    .sd-destination,
    .sd-platform {
        padding: 4px 5px;
        font-size: 1rem;
        min-width: 0;
    }

    .sd-clock {
        margin-right: 6px;
    }

    .sd-clock-face {
        width: 30px;
        height: 30px;
        border-width: 2px;
    }

    .sd-clock-hour {
        height: 8px;
    }

    .sd-clock-minute {
        height: 11px;
    }

    .sd-clock-second {
        height: 13px;
    }
}