/* GrantDetails.aspx - page styles. Sizes are in px because Bootstrap 3 sets html { font-size: 10px } site-wide.
   Colors come from the active theme variables
   (css/root-colors/*.css) so every site theme applies. Everything is scoped to .gd-page. */

.gd-page { max-width: 1140px; margin: 0 auto; }
.gd-page *, .gd-page *::before, .gd-page *::after { box-sizing: border-box; }

/* ---------- breadcrumb ---------- */
.gd-crumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
    margin: 0 0 22px;
    font-size: 14.7px;
    color: var(--text, #1a2535);
}

    .gd-crumbs li + li::before {
        content: "\203A";
        margin-right: 6px;
        color: var(--border, #8ba8ae);
    }

    .gd-crumbs a {
        color: var(--green, #266447);
        font-weight: 600;
        text-decoration: underline;
        text-underline-offset: 3px;
    }

    .gd-crumbs [aria-current] { color: var(--text, #1a2535); }

/* ---------- hero / summary ---------- */
.gd-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: space-between;
    gap: 24px;
    background: var(--green-dark, #113b28);
    color: var(--sand, #f8f7f2);
    border-radius: 18px;
    padding: 30px 32px;
    margin-bottom: 24px;
    box-shadow: 0 14px 40px rgba(15, 61, 72, .12);
}

.gd-hero-main { flex: 1 1 420px; min-width: 0; }

.gd-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 30px;
    background: rgba(255, 255, 255, .12);
    color: var(--sand, #f8f7f2);
}

    .gd-status i { font-size: 8.8px; }
    .gd-status--active i { color: #7fd4a6; }
    .gd-status--reporting i { color: #f2c94c; }

.gd-page .gd-title {
    font-weight: 700;
    color: var(--sand, #f8f7f2);
    font-size: clamp(24px, 17.6px + 1.6vw, 35.2px);
    line-height: 1.2;
    margin: 14px 0 10px;
    text-align: left;
    overflow-wrap: anywhere;
}

.gd-grantor {
    margin: 0;
    font-size: 16.8px;
    color: var(--sand, #f8f7f2);
    opacity: .92;
}

    .gd-grantor i { margin-right: 8px; }
    .gd-grantor strong { font-weight: 700; }

.gd-amount {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 220px;
    padding: 18px 24px;
    border-radius: 14px;
    background: var(--sand, #f8f7f2);
    color: var(--green-dark, #113b28);
    text-align: right;
}

.gd-amount-label {
    font-size: 12.8px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text, #1a2535);
}

.gd-amount-value {
    font-size: clamp(27.2px, 20.8px + 1.5vw, 38.4px);
    font-weight: 800;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

/* ---------- cards ---------- */
.gd-card {
    background: #fff;
    border: 1px solid var(--border, #8ba8ae);
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: 0 10px 30px rgba(15, 61, 72, .06);
    min-width: 0;
}

.gd-page .gd-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 19.2px;
    margin: 0 0 16px;
    color: var(--green-dark, #113b28);
    text-align: left;
}

    .gd-card-head > i { color: var(--green, #266447); }

.gd-count {
    margin-left: auto;
    font-size: 12.8px;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
    padding: 2px 10px;
    border-radius: 20px;
    background: var(--gray-light, #eef3f4);
    color: var(--text, #1a2535);
}

.gd-none {
    margin: 0;
    padding: 18px;
    border-radius: 12px;
    background: var(--gray-light, #eef3f4);
    color: var(--text, #1a2535);
}

/* ---------- grant period ---------- */
.gd-period { margin-bottom: 24px; }

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

    .gd-dates dt {
        font-size: 12.5px;
        font-weight: 700;
        letter-spacing: .06em;
        text-transform: uppercase;
        color: var(--text, #1a2535);
        opacity: .8;
    }

    .gd-dates dd {
        margin: 2px 0 0;
        font-size: 17.6px;
        font-weight: 600;
        color: var(--green-dark, #113b28);
    }

.gd-bar {
    height: 12px;
    border-radius: 20px;
    background: var(--gray-light, #eef3f4);
    overflow: hidden;
}

    .gd-bar > span {
        display: block;
        height: 100%;
        min-width: 6px;
        border-radius: 20px;
        background: linear-gradient(90deg, var(--green, #266447), var(--green-light, #42946e));
    }

.gd-bar-note {
    margin: 10px 0 0;
    font-size: 15.2px;
    color: var(--text, #1a2535);
}

/* ---------- two-column body ---------- */
.gd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

/* ---------- documents ---------- */
.gd-doclist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gd-doc {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid var(--gray-light, #eef3f4);
}

    .gd-doc:first-child { border-top: 0; padding-top: 4px; }

.gd-doc-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 20px;
    background: var(--gray-light, #eef3f4);
    color: var(--green, #266447);
}

    .gd-ext-pdf { background: #fdecea; color: #b42318; }
    .gd-ext-doc, .gd-ext-docx, .gd-ext-rtf { background: #e8f0fd; color: #1d4ed8; }
    .gd-ext-xls, .gd-ext-xlsx, .gd-ext-csv { background: #e7f6ec; color: #17693a; }

.gd-doc-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.gd-doc-title {
    font-weight: 600;
    color: var(--text, #1a2535);
    overflow-wrap: anywhere;
}

.gd-doc-meta {
    font-size: 14.1px;
    color: var(--text, #1a2535);
    opacity: .78;
}

.gd-page .gd-doc-btn {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 2px solid var(--green, #266447);
    border-radius: 30px;
    color: var(--green, #266447);
    background: transparent;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

    .gd-page .gd-doc-btn:hover,
    .gd-page .gd-doc-btn:focus-visible {
        background: var(--green, #266447);
        color: #fff;
    }

.gd-page a:focus-visible {
    outline: 3px solid var(--gold, #946F00);
    outline-offset: 2px;
}

/* ---------- updates timeline ---------- */
.gd-timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 22px;
    position: relative;
}

    .gd-timeline::before {
        content: "";
        position: absolute;
        left: 6px;
        top: 6px;
        bottom: 6px;
        width: 2px;
        background: var(--gray-light, #eef3f4);
    }

    .gd-timeline li {
        position: relative;
        padding-bottom: 20px;
    }

        .gd-timeline li:last-child { padding-bottom: 0; }

        .gd-timeline li::before {
            content: "";
            position: absolute;
            left: -21px;
            top: 5px;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #fff;
            border: 3px solid var(--green, #266447);
        }

        .gd-timeline li:first-child::before { background: var(--green, #266447); }

.gd-tl-date {
    display: block;
    font-size: 12.8px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--green, #266447);
}

.gd-tl-body {
    margin: 4px 0 0;
    line-height: 1.55;
    color: var(--text, #1a2535);
    overflow-wrap: anywhere;
}

    .gd-tl-body > :first-child { margin-top: 0; }
    .gd-tl-body > :last-child { margin-bottom: 0; }
    .gd-tl-body p { margin: 0 0 6px; }
    .gd-tl-body ul, .gd-tl-body ol { margin: 4px 0 8px; padding-left: 22px; }
    .gd-tl-body a { color: var(--green, #266447); text-decoration: underline; }
    .gd-tl-body table { border-collapse: collapse; margin: 6px 0; max-width: 100%; }
    .gd-tl-body th, .gd-tl-body td { border: 1px solid var(--gray-light, #eef3f4); padding: 4px 8px; }

/* ---------- not found ---------- */
.gd-empty-state {
    text-align: center;
    max-width: 560px;
    margin: 20px auto 10px;
    padding: 40px 28px;
    background: #fff;
    border: 1px solid var(--border, #8ba8ae);
    border-radius: 18px;
}

    .gd-empty-state > i {
        font-size: 41.6px;
        color: var(--green, #266447);
        margin-bottom: 12px;
    }

    .gd-empty-state h2 { font-size: 24px; margin: 0 0 10px; }
    .gd-empty-state p { margin: 0 0 22px; }

/* ---------- back link ---------- */
.gd-back {
    text-align: center;
    margin: 32px 0 0;
}

/* ---------- responsive ---------- */
@media (max-width: 991px) {
    .gd-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .gd-hero { padding: 22px 20px; }
    .gd-amount { min-width: 0; width: 100%; text-align: left; }
    .gd-card { padding: 18px; }
    .gd-dates { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .gd-dates > div:last-child { grid-column: 1 / -1; }
    .gd-doc {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        column-gap: 14px;
        row-gap: 10px;
    }
    .gd-page .gd-doc-btn { grid-column: 2; justify-self: start; }
}

@media print {
    .gd-crumbs, .gd-back, .gd-doc-btn { display: none !important; }
    .gd-hero { background: none; color: #000; box-shadow: none; border: 1px solid #999; }
    .gd-page .gd-title, .gd-grantor, .gd-status { color: #000; }
    .gd-card { box-shadow: none; }
}
