/* ============================================================
   DOWNLOADS PAGE
   Coleraine & District Indoor Bowling League
   ============================================================ */

.downloads-main {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: 28px 0 54px;
    color: #173650;
}


/* ============================================================
   PAGE HEADING
   ============================================================ */

.downloads-page-heading {
    margin-bottom: 28px;
    padding: 26px 28px;
    border: 1px solid #d7e5ef;
    border-radius: 16px;
    background: #f7fbfe;
    box-shadow: 0 8px 24px rgba(16, 54, 92, 0.07);
}

.downloads-kicker {
    display: inline-block;
    margin-bottom: 5px;
    color: #2877ab;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.downloads-page-heading h2 {
    margin: 0;
    color: #10365c;
    font-size: clamp(1.7rem, 4vw, 2.35rem);
    line-height: 1.1;
}

.downloads-page-heading p {
    max-width: 760px;
    margin: 10px 0 0;
    color: #536a7c;
    line-height: 1.55;
}


/* ============================================================
   SECTIONS
   ============================================================ */

.downloads-section {
    margin-top: 32px;
}

.downloads-section-heading {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid #2877ab;
}

.downloads-section-heading h3 {
    margin: 0;
    color: #10365c;
    font-size: 1.35rem;
}

.downloads-section-heading p {
    margin: 5px 0 0;
    color: #607487;
    line-height: 1.45;
}


/* ============================================================
   CARDS
   ============================================================ */

.downloads-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.download-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 20px;
    border: 1px solid #d4e2ec;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(16, 54, 92, 0.08);
}

.download-card.is-pending {
    background: #f8fafb;
}

.download-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: #e2eff8;
    color: #10365c;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.download-card-heading {
    min-height: 64px;
}

.download-card-heading h4 {
    margin: 0;
    color: #10365c;
    font-size: 1.08rem;
    line-height: 1.25;
}

.download-card-heading p {
    margin: 6px 0 0;
    color: #6a7d8c;
    font-size: 0.9rem;
    line-height: 1.4;
}


/* ============================================================
   TEAM SELECTOR
   ============================================================ */

.team-highlight-label {
    display: block;
    margin: 18px 0 7px;
    color: #173650;
    font-size: 0.88rem;
    font-weight: 700;
}

.team-highlight-label span {
    color: #708292;
    font-weight: 400;
}

.team-highlight-select {
    width: 100%;
    min-height: 44px;
    padding: 9px 38px 9px 11px;
    border: 1px solid #b9cbd9;
    border-radius: 9px;
    background: #ffffff;
    color: #173650;
    font: inherit;
}

.team-highlight-select:focus {
    outline: 3px solid rgba(40, 119, 171, 0.18);
    border-color: #2877ab;
}


/* ============================================================
   STATUS
   ============================================================ */

.download-status {
    align-self: flex-start;
    margin-top: 18px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
}

.download-status.is-available {
    background: #e7f4ea;
    color: #25633a;
}

.download-status.is-pending {
    background: #edf1f4;
    color: #657481;
}

.download-card-note {
    margin: 14px 0 0;
    color: #697c8b;
    font-size: 0.88rem;
    line-height: 1.45;
}


/* ============================================================
   BUTTONS
   ============================================================ */

.download-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-top: auto;
    padding-top: 20px;
}

.download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    padding: 9px 12px;
    border: 2px solid #2877ab;
    border-radius: 9px;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition:
        transform 0.15s ease,
        background-color 0.15s ease,
        color 0.15s ease;
}

.download-button:hover {
    transform: translateY(-1px);
}

.download-button-primary {
    background: #2877ab;
    color: #ffffff;
}

.download-button-primary:hover {
    background: #1f6493;
    border-color: #1f6493;
}

.download-button-secondary {
    background: #ffffff;
    color: #1f6696;
}

.download-button-secondary:hover {
    background: #edf7fd;
}


/* ============================================================
   EMPTY / HELP
   ============================================================ */

.downloads-empty-card,
.downloads-help {
    padding: 18px 20px;
    border: 1px solid #d5e3ed;
    border-radius: 12px;
    background: #f7fbfe;
    color: #536a7c;
}

.downloads-help {
    margin-top: 30px;
    border-left: 5px solid #2877ab;
}

.downloads-help strong {
    color: #10365c;
}

.downloads-help p {
    margin: 5px 0 0;
    line-height: 1.5;
}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 900px) {

    .downloads-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 620px) {

    .downloads-main {
        width: min(100% - 20px, 1180px);
        padding-top: 18px;
    }

    .downloads-page-heading {
        padding: 20px 18px;
        border-radius: 12px;
    }

    .downloads-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .download-card {
        padding: 18px;
        border-radius: 12px;
    }

    .download-card-heading {
        min-height: 0;
    }

    .download-actions {
        grid-template-columns: 1fr;
    }

    .download-button {
        min-height: 48px;
        font-size: 0.95rem;
    }

    .team-highlight-select {
        min-height: 48px;
    }

}
