/* ---------------------------------
   Space Coast Launches
---------------------------------- */

.launch-hero {
    margin-bottom: 46px;
}

.launch-title-row {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.launch-icon {
    display: grid;
    place-items: center;

    flex: 0 0 auto;

    width: 66px;
    height: 66px;

    margin-top: 5px;

    border: 1px solid
        color-mix(in srgb, var(--blue) 42%, transparent);

    border-radius: 19px;

    background:
        color-mix(in srgb, var(--blue) 11%, transparent);

    font-size: 2rem;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08);
}


.launch-hero h1 {
    font-size: clamp(3.2rem, 8vw, 6rem);
    line-height: .92;
}


/* Main launch panel */

.launch-panel {
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: var(--radius-large);

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.025),
            transparent 45%
        ),
        var(--panel);

    box-shadow: var(--shadow);
}


.launch-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;

    padding: 26px 28px;

    border-bottom: 1px solid var(--border);
}


.launch-panel-header h2 {
    margin: 0;

    font-size: 1.65rem;
    letter-spacing: -.035em;
}


.launch-count {
    flex: 0 0 auto;

    padding: 8px 13px;

    border: 1px solid
        color-mix(in srgb, var(--blue) 30%, transparent);

    border-radius: 999px;

    background:
        color-mix(in srgb, var(--blue) 8%, transparent);

    color: var(--blue);

    font-size: .76rem;
    font-weight: 750;

    letter-spacing: .08em;
    text-transform: uppercase;
}


/* Table */

.launch-table-wrap {
    overflow-x: auto;
}


.launch-table {
    width: 100%;
    border-collapse: collapse;
}


.launch-table th,
.launch-table td {
    padding: 20px 22px;

    text-align: left;
    vertical-align: middle;
}


.launch-table th {
    color: var(--muted);

    font-size: .72rem;
    font-weight: 800;

    letter-spacing: .11em;
    text-transform: uppercase;

    background:
        rgba(3, 9, 17, .22);
}


.launch-table tbody tr {
    border-top: 1px solid
        rgba(148, 180, 215, .1);

    transition: background 160ms ease;
}


.launch-table tbody tr:hover {
    background:
        rgba(86, 168, 255, .045);
}


.launch-table td {
    color: var(--muted);

    font-size: .9rem;
}


.mission-cell {
    width: 42%;
}


.mission-name {
    color: var(--text);

    font-size: .98rem;
    font-weight: 650;
}


.details-cell {
    width: 1%;
    white-space: nowrap;
}


.details-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: var(--blue);

    font-weight: 700;

    text-decoration: none;

    transition:
        color 160ms ease,
        transform 160ms ease;
}


.details-link:hover,
.details-link:focus-visible {
    color: var(--cyan);
}


.details-link:hover span {
    transform: translateX(3px);
}


.details-link span {
    transition: transform 160ms ease;
}


.loading-row {
    padding: 40px !important;

    color: var(--muted) !important;
    text-align: center !important;
}


/* Mobile */

@media (max-width: 760px) {

    .launch-title-row {
        display: block;
    }


    .launch-icon {
        margin-bottom: 24px;
    }


    .launch-hero h1 {
        font-size: clamp(3rem, 17vw, 4.5rem);
    }


    .launch-panel-header {
        align-items: flex-start;

        padding: 22px;
    }


    .launch-count {
        display: none;
    }


    .launch-table th,
    .launch-table td {
        padding: 16px;
    }


    /*
       Window Close isn't terribly useful on
       a small phone screen.
    */

    .launch-table th:nth-child(3),
    .launch-table td:nth-child(3) {
        display: none;
    }


    .mission-cell {
        min-width: 220px;
    }

}

/* ---------------------------------
   Launch detail page
---------------------------------- */

.launch-detail-hero {
    margin-bottom: 42px;
}


.launch-detail-hero h1 {
    margin: 0 0 18px;

    max-width: 900px;

    font-size: clamp(3rem, 7vw, 5.5rem);
    line-height: .95;
    letter-spacing: -.055em;
}


.launch-detail-grid {
    display: grid;

    grid-template-columns:
        minmax(280px, .85fr)
        minmax(0, 1.4fr);

    gap: 28px;

    align-items: start;
}


/* Image */

.launch-image-card {
    overflow: hidden;

    position: sticky;
    top: 24px;

    min-height: 360px;

    border: 1px solid var(--border);
    border-radius: var(--radius-large);

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.035),
            transparent
        ),
        var(--panel);

    box-shadow: var(--shadow);
}


.launch-image {
    display: block;

    width: 100%;
    min-height: 360px;
    max-height: 620px;

    object-fit: cover;
}


.no-launch-image {
    display: grid;
    place-items: center;
}


.no-launch-image::after {
    content: "🚀";

    font-size: 5rem;

    opacity: .35;
}


/* Information panel */

.launch-info-panel {
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: var(--radius-large);

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.025),
            transparent 45%
        ),
        var(--panel);

    box-shadow: var(--shadow);
}


.launch-info-section {
    padding: 30px;
}


.launch-info-section + .launch-info-section {
    border-top: 1px solid var(--border);
}


.launch-info-section h2 {
    margin:
        0 0 14px;

    font-size: 1.55rem;
    letter-spacing: -.035em;
}


.launch-info-section p {
    margin:
        0;

    color: var(--muted);

    font-size: .98rem;
    line-height: 1.75;
}


/* Weather */

.weather-probability {
    display: flex;
    align-items: baseline;
    gap: 12px;

    margin-top: 22px;

    padding: 18px 20px;

    border: 1px solid
        color-mix(
            in srgb,
            var(--cyan) 25%,
            transparent
        );

    border-radius: 16px;

    background:
        color-mix(
            in srgb,
            var(--cyan) 6%,
            transparent
        );
}


.probability-number {
    color: var(--cyan);

    font-size: 2.1rem;
    font-weight: 800;

    letter-spacing: -.05em;
}


.probability-label {
    color: var(--muted);

    font-size: .82rem;
}


.weather-concerns {
    margin-top: 15px !important;

    font-size: .88rem !important;
}


/* Error */

.launch-error-panel {
    grid-column: 1 / -1;

    padding: 40px;

    border: 1px solid var(--border);
    border-radius: var(--radius-large);

    background: var(--panel);

    color: var(--muted);

    text-align: center;
}


/* Responsive */

@media (max-width: 820px) {

    .launch-detail-grid {
        grid-template-columns: 1fr;
    }


    .launch-image-card {
        position: static;

        min-height: 280px;
    }


    .launch-image {
        min-height: 280px;
        max-height: 460px;
    }


    .launch-info-section {
        padding: 24px;
    }

}


@media (max-width: 560px) {

    .launch-detail-hero h1 {
        font-size:
            clamp(2.7rem, 15vw, 4rem);
    }


    .weather-probability {
        align-items: flex-start;
        flex-direction: column;

        gap: 2px;
    }

}