/* iOS 6 Safari compatible styles */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@800&display=swap');

* {
    margin: 0;
    padding: 0;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
}

body {
    font-family: 'Open Sans', 'Arial Black', sans-serif;
    font-weight: 800;
    background-color: #1a1a1a;
    color: white;
    margin: 0;
    /* iOS 6 compatible centering */
    position: relative;
    text-align: center;
}

.transit-sign {
    width: 100%;
    max-width: 1000px;
    padding: 40px;
    /* iOS 6 compatible centering */
    margin: 0 auto;
    margin-top: 50px;
    text-align: left;
}

.station-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 3px solid #3cad2b;
    padding-bottom: 15px;
}

.station-header h1 {
    font-size: 48px;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#arrivals-container {
    width: 100%;
}

.arrival-row {
    /* iOS 6 compatible layout using table-cell */
    display: table;
    width: 100%;
    margin-bottom: 0;
    padding: 30px 0;
    border-bottom: 1px solid #333;
    min-height: 100px;
    font-size: 3.5rem;
    letter-spacing: -0.02em;
}

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

.route-info {
    display: table-cell;
    vertical-align: middle;
    width: 75%;
}

.time-info {
    display: table-cell;
    vertical-align: middle;
    width: 25%;
    text-align: right;
}

.route-number {
    display: inline-block;
    background-color: #3cad2b;
    color: white;
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
    font-weight: 800;
    margin-right: 25px;
    vertical-align: middle;
    line-height: 80px;
    text-align: center;
    /* iOS 6 compatible circular border-radius */
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
}

.destination {
    display: inline-block;
    font-size: 2.8rem;
    font-weight: 800;
    color: white;
    vertical-align: middle;
    line-height: 1.1;
    font-stretch: extra-condensed;
    white-space: nowrap;
    overflow: hidden;
}

.signal-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 20px;
    font-size: 2.5rem;
    width: 40px;
    text-align: center;
    color: #3cad2b;
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
}

.signal-image {
    width: 40px;
    height: 40px;
    vertical-align: middle;
}

.arrival-time {
    display: inline-block;
    font-size: 3.5rem;
    font-weight: 800;
    vertical-align: middle;
    min-width: 150px;
    text-align: right;
}

.arrival-time.realtime {
    color: #3cad2b;
}

.arrival-time.scheduled {
    color: #ffa500;
}

.no-arrivals {
    text-align: center;
    font-size: 24px;
    color: #888;
    padding: 40px;
    font-style: italic;
}

/* iOS 6 specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 1) {
    body {
        -webkit-text-size-adjust: 100%;
    }

    .arrival-row {
        /* Ensure consistent spacing on iOS 6 */
        -webkit-transform: translateZ(0);
    }

    .route-number {
        /* Better text rendering on iOS 6 */
        -webkit-font-smoothing: antialiased;
    }
}

/* Landscape orientation adjustments */
@media screen and (orientation: landscape) {
    .transit-sign {
        margin-top: 20px;
    }

    .station-header h1 {
        font-size: 40px;
    }

    .arrival-row {
        min-height: 80px;
        padding: 25px 0;
        font-size: 3rem;
    }

    .route-number {
        width: 70px;
        height: 70px;
        font-size: 2rem;
        line-height: 70px;
    }

    .destination {
        font-size: 2.3rem;
    }

    .arrival-time {
        font-size: 3rem;
    }

    .signal-icon {
        font-size: 2rem;
        width: 35px;
    }
}

/* Small screen adjustments */
@media screen and (max-width: 480px) {
    .transit-sign {
        width: 100%;
        padding: 20px;
    }

    .station-header h1 {
        font-size: 36px;
    }

    .route-number {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
        line-height: 60px;
        margin-right: 20px;
    }

    .destination {
        font-size: 2.2rem;
    }

    .arrival-time {
        font-size: 2.8rem;
        min-width: 130px;
    }

    .arrival-row {
        padding: 25px 0;
        font-size: 2.8rem;
        min-height: 90px;
    }

    .signal-icon {
        font-size: 2rem;
        width: 30px;
        margin-right: 15px;
    }

    .signal-image {
        width: 35px;
        height: 35px;
    }
}