/* Certificate verification. Colours follow frontend/web/css/site.css (TIS). */

/*
 * Figtree (SIL Open Font License, see /fonts/OFL.txt), served from this domain: the page loads
 * nothing from other hosts. One variable file holds all weights; the second one is only fetched
 * for names with characters beyond Western European ones.
 */

@font-face {
    font-family: 'Figtree';
    font-style: normal;
    font-weight: 300 900;
    font-display: swap;
    src: url('../fonts/figtree-latin-wght-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Figtree';
    font-style: normal;
    font-weight: 300 900;
    font-display: swap;
    src: url('../fonts/figtree-latin-ext-wght-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --tapa-blue: #0085c3;
    --tapa-blue-hover: #0571a3;
    --tapa-band: #0a4b83;
    --tapa-deep: #00274a;

    --page: #f3f6f9;
    --surface: #fff;
    --border: #dfe6ec;
    --text: #1d2b3a;
    --muted: #5b6b7b;
    --input: #fff;
    --title: #0085c3;
    --track: #e3eaf0;

    --valid: #17804f;
    --expired: #bf3528;
    --pending: #9c6100;
    --unknown: #5b6b7b;

    --shadow: 0 3px 10px #00000014;
}

@media (prefers-color-scheme: dark) {
    :root {
        --page: #212f41;
        --surface: #26374c;
        --border: #ffffff26;
        --text: #fff;
        --muted: #b9c6d3;
        --input: #1d2a3a;
        --title: #38b1e8;
        --track: #ffffff26;
        --shadow: none;
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family: 'Figtree', 'Helvetica Neue', Arial, sans-serif;
    font-size: 17px;
    line-height: 1.45;
}

/* Header: same band and dark logo block as the TIS layout, kept within the band's height. */

.vf-header {
    position: relative;
    display: flex;
    flex: none;
    height: 68px;
    background: var(--tapa-band);
}

.vf-header__logo {
    display: block;
    flex: none;
    width: 16.667%;
    min-width: 190px;
    height: 68px;
    padding: 7px 0 0 32px;
    background: var(--tapa-deep);
}

.vf-header__logo img {
    display: block;
    height: 54px;
}


/* Page */

.vf-main {
    flex: 1 0 auto;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 64px 24px 56px;
}

.vf-title {
    margin: 0;
    color: var(--title);
    font-size: 30px;
    font-weight: 700;
    line-height: 37px;
    text-transform: uppercase;
}

.vf-lead {
    margin: 10px 0 32px;
    color: var(--muted);
    font-size: 19px;
}

.vf-link {
    color: var(--title);
}

/* Search */

.vf-search {
    margin-bottom: 28px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.vf-search__label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.vf-search__row {
    display: flex;
    gap: 12px;
}

.vf-search__input {
    flex: 1;
    min-width: 0;
    height: 52px;
    padding: 0 16px;
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font: inherit;
    font-size: 20px;
    letter-spacing: 0.03em;
}

.vf-search__input::placeholder {
    color: var(--muted);
    letter-spacing: normal;
    opacity: 0.75;
}

.vf-search__input:focus,
.vf-search__button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--tapa-blue) 45%, transparent);
    outline-offset: 1px;
    border-color: var(--tapa-blue);
}

.vf-search__button {
    flex: none;
    height: 52px;
    padding: 0 32px;
    background: var(--tapa-blue);
    border: 1px solid var(--tapa-blue);
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.vf-search__button:hover {
    background: var(--tapa-blue-hover);
    border-color: var(--tapa-blue-hover);
}

/* Notices */

.vf-notice {
    padding: 20px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 5px solid var(--tapa-blue);
    border-radius: 6px;
}

.vf-notice__title {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
}

.vf-notice__text {
    margin: 0;
    color: var(--muted);
}

.vf-multi {
    margin: 0 0 16px;
    font-weight: 600;
}

.vf-checked {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 15px;
}

/* Result */

.vf-result {
    --status: var(--unknown);
    margin-bottom: 20px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.vf-result--valid {
    --status: var(--valid);
}

.vf-result--expired {
    --status: var(--expired);
}

.vf-result--not_yet_valid {
    --status: var(--pending);
}

.vf-result__status {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    background: var(--status);
    color: #fff;
}

.vf-result__icon {
    flex: none;
    width: 44px;
    height: 44px;
    padding: 8px;
    background: #ffffff2e;
    border-radius: 50%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.vf-result__headline {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.vf-result__detail {
    margin: 2px 0 0;
}

.vf-result__body {
    padding: 24px;
}

.vf-result__label,
.vf-facts dt,
.vf-period__label {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.vf-result__holder {
    margin: 2px 0 20px;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.vf-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    margin: 0;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.vf-facts dd {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
}

.vf-facts__number {
    font-weight: 700;
    letter-spacing: 0.03em;
}

.vf-period {
    padding-top: 20px;
}

.vf-period__dates {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.vf-period__end {
    text-align: right;
}

.vf-period__label,
.vf-period__date {
    display: block;
}

.vf-period__date {
    font-size: 20px;
    font-weight: 700;
}

.vf-period__track {
    height: 6px;
    margin-top: 12px;
    overflow: hidden;
    background: var(--track);
    border-radius: 3px;
}

.vf-period__fill {
    height: 100%;
    background: var(--status);
}

/* Footer */

/* Footer: dark band like the header logo block, so the white TAPA EMEA logo reads in both themes. */

.vf-footer {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
    padding: 20px 32px;
    background: var(--tapa-deep);
    color: #c3d1de;
    font-size: 15px;
}

.vf-footer__logo {
    display: block;
    flex: none;
    height: 34px;
}

.vf-footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 20px;
}

.vf-footer a {
    color: #fff;
}

@media (max-width: 767px) {
    .vf-header__logo {
        width: 130px;
        min-width: 0;
        padding-left: 16px;
    }

    .vf-footer {
        flex-direction: column;
        padding: 24px 16px;
    }

    .vf-footer__logo {
        height: 30px;
    }

    .vf-main {
        padding: 36px 16px 40px;
    }

    .vf-search {
        padding: 16px;
    }

    .vf-search__row {
        flex-direction: column;
    }

    .vf-search__input {
        flex: none;
    }

    .vf-search__button {
        width: 100%;
    }

    .vf-facts {
        grid-template-columns: 1fr;
    }

    /* Both dates stay on one line next to each other on a phone. */
    .vf-period__dates {
        gap: 12px;
    }

    .vf-period__date {
        font-size: 16px;
    }
}
