/* ==========================================================================
   Secret Share - Buzz Interactive brand
   Colours, type and shapes follow the buzzinteractive.co.uk theme.
   ========================================================================== */

/* Bundled locally so the site makes no third-party font requests. */
@font-face {
    font-family: "Roboto Condensed";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/roboto-condensed-latin.woff2") format("woff2");
}

:root {
    --green: #8cc63f;
    --green-dark: #385018;
    --btn-to: #cee74e;
    --icon-bg: #f1f8e8;
    --black: #000;
    --paper: #fff;
    --grey-bg: #f3f3f3;
    --grey: #808080;
    --grey-light: #dadada;
    --grey-dark: #505050;
    --error: #c4001a;

    --font: "Roboto Condensed", Helvetica, Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --radius-bubble: 1.5rem 1.5rem 1.5rem 0;
    --radius-field: 0.75rem 0.75rem 0.75rem 0;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    font-weight: 300;
    font-size: 1.125rem;
    line-height: 1.55;
    color: var(--black);
    background: var(--grey-bg);
    -webkit-font-smoothing: antialiased;
}

/* The icons the pages use, defined once at the top of the page. */
.ss-sprite { display: none; }

strong, b { font-weight: 700; }
a { color: inherit; }
p { margin: 0 0 1rem; }

:focus-visible {
    outline: 3px solid var(--green);
    outline-offset: 3px;
}

/* Header ----------------------------------------------------------------- */
.ss-header {
    background: var(--paper);
    border-bottom: 1px solid var(--grey-light);
}

.ss-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 46rem;
    margin: 0 auto;
    padding: 1.1rem 1.25rem;
}

.ss-header-link { color: var(--green-dark); font-size: 1rem; font-weight: 400; }

.ss-header img { height: 34px; display: block; }

/* Layout ----------------------------------------------------------------- */
main {
    max-width: 46rem;
    margin: 0 auto;
    padding: clamp(2rem, 6vh, 3.5rem) 1.25rem;
}

.ss-card {
    background: var(--paper);
    border: 1px solid var(--grey-light);
    border-radius: var(--radius-bubble);
    padding: clamp(1.5rem, 4vw, 2.75rem);
}

/* Type ------------------------------------------------------------------- */
h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw + 0.75rem, 3rem);
    font-weight: 300;
    line-height: 1.02;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-wrap: balance;
}

/* The website's thin green rule under headings. */
.ss-rule {
    width: clamp(140px, 30%, 220px);
    height: 1px;
    margin: 1.5rem 0;
    background: var(--green);
}

.ss-lead {
    font-size: 1.25rem;
    line-height: 1.45;
    text-wrap: balance;
}

.ss-muted { color: var(--grey-dark); }

/* The subject of a secret: a filled speech bubble with a label, so it can't be mistaken for an outlined button. */
.ss-reference {
    margin: 0 0 1.75rem;
    padding: 1rem 1.4rem;
    border-radius: var(--radius-bubble);
    background: var(--grey-bg);
    font-size: 1.15rem;
    font-weight: 400;
    overflow-wrap: anywhere;
}

.ss-reference-label {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--grey-dark);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Tick list: ticks sit in a small green speech bubble, as on the website. */
.ss-checks {
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
    display: grid;
    gap: 0.7rem;
}

/* Feature list under the form, for anyone who wants the detail. */
.ss-checks-footnote {
    margin: 2.25rem 0 0;
    padding-top: 1.75rem;
    border-top: 1px solid var(--grey-light);
    font-size: 1rem;
    color: var(--grey-dark);
}

.ss-checks li {
    display: grid;
    grid-template-columns: 1.6rem 1fr;
    gap: 0.75rem;
    align-items: start;
}

.ss-checks .ss-icon {
    width: 1.6rem;
    height: 1.6rem;
    padding: 0.33rem;
    border-radius: 50% 50% 50% 0;
    background: var(--green);
    fill: none;
    stroke: var(--black);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Form ------------------------------------------------------------------- */
.ss-field { margin-bottom: 1.4rem; }

.ss-field label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 700;
}

/* Required marker; the required attribute tells screen readers. */
.ss-required::after {
    content: " *";
    color: var(--green-dark);
}

.ss-required-note {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    color: var(--grey-dark);
}

.ss-required-note-after { margin: 0.9rem 0 0; }

/* Small print under a form's button, such as who to contact for help. */
.ss-help {
    margin: 1.25rem 0 0;
    font-size: 0.95rem;
    color: var(--grey-dark);
}

.ss-help a { color: var(--green-dark); font-weight: 400; }

.ss-field input,
.ss-field textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font: inherit;
    font-weight: 400;
    color: var(--black);
    background: var(--paper);
    border: 1px solid var(--grey-light);
    border-radius: var(--radius-field);
    transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.ss-field input::placeholder { color: var(--grey); font-weight: 300; }

.ss-field input:focus,
.ss-field textarea:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(140, 198, 63, 0.35);
}

.ss-field textarea { resize: vertical; min-height: 9rem; }

.ss-mono { font-family: var(--mono) !important; font-size: 1rem !important; }

.ss-field input.ss-code {
    max-width: 13rem;
    font-family: var(--mono);
    font-size: 1.75rem;
    letter-spacing: 0.4rem;
    text-align: center;
}

/* The code split into one box per digit. */
.ss-code-boxes {
    display: flex;
    gap: 0.6rem;
}

.ss-field input.ss-code-box {
    flex: 1 1 0;
    min-width: 0;
    max-width: 3.25rem;
    height: 4rem;
    padding: 0;
    font-family: var(--mono);
    font-size: 1.75rem;
    text-align: center;
}

/* Checkbox: native control, tinted to the brand green. */
.ss-check-field {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: -0.25rem 0 1.6rem;
}

.ss-check-field input {
    width: 1.2rem;
    height: 1.2rem;
    margin: 0;
    accent-color: var(--green-dark);
}

.ss-check-field label { font-weight: 400; cursor: pointer; }

.ss-hint { display: block; margin-top: 0.35rem; font-size: 0.95rem; color: var(--grey-dark); }

.ss-error,
.field-validation-error { display: block; margin-top: 0.35rem; font-size: 0.95rem; font-weight: 400; color: var(--error); }

.field-validation-valid { display: none; }

.input-validation-error { border-color: var(--error) !important; }

/* File upload: a drop box and a progress bar. ----------------------------- */
.ss-label { display: block; margin-bottom: 0.4rem; font-weight: 700; }

.ss-field label.ss-drop {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-height: 9rem;
    margin: 0;
    padding: 1.5rem 1rem;
    font-weight: 400;
    text-align: center;
    background: var(--grey-bg);
    border: 2px dashed var(--grey-light);
    border-radius: var(--radius-bubble);
    cursor: pointer;
    transition: border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}

.ss-drop:hover,
.ss-drop.is-over { border-color: var(--green); background: var(--icon-bg); }

.ss-drop:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(140, 198, 63, 0.35); }

/* Hidden but still focusable, so the box works from the keyboard. */
.ss-field input.ss-drop-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    opacity: 0;
    overflow: hidden;
}

.ss-drop-prompt strong { color: var(--green-dark); }

.ss-drop-chosen { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; max-width: 100%; }
.ss-drop-name { font-weight: 700; overflow-wrap: anywhere; }
.ss-drop-size { color: var(--grey-dark); }
.ss-drop-change { margin-top: 0.3rem; font-size: 0.95rem; color: var(--green-dark); text-decoration: underline; }

.ss-drop [hidden],
.ss-progress[hidden],
.ss-file-chosen[hidden] { display: none; }

/* The files a client has chosen to send, each with a button to take it off. */
.ss-hint-button { font-size: inherit; margin-left: 0.25rem; }

.ss-file-chosen { margin-top: 1rem; }

.ss-file-summary { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.4rem; font-weight: 700; }
.ss-file-summary .ss-link-button { font-size: 0.95rem; font-weight: 400; }

.ss-file-list {
    max-height: 18rem;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--grey-light);
    border-radius: 0.75rem;
}

.ss-file-list li {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 0.5rem 0.45rem 0.9rem;
    border-top: 1px solid var(--grey-light);
}

.ss-file-list li:first-child { border-top: 0; }
.ss-file-name { overflow-wrap: anywhere; }
.ss-file-size { color: var(--grey-dark); font-size: 0.95rem; white-space: nowrap; }

.ss-file-remove {
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--grey-dark);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.ss-file-remove:hover:not(:disabled) { background: var(--grey-bg); color: var(--error); }
.ss-file-remove:disabled { cursor: default; opacity: 0.4; }

.ss-progress { margin: 0 0 1.4rem; }

.ss-progress-track {
    height: 0.75rem;
    overflow: hidden;
    background: var(--grey-bg);
    border-radius: var(--radius-field);
}

.ss-progress-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--green), var(--btn-to));
    transition: width 0.3s var(--ease-out);
}

.ss-progress-text { margin: 0.5rem 0 0; font-size: 0.95rem; color: var(--grey-dark); }

/* Alerts ----------------------------------------------------------------- */
.ss-alert {
    margin-bottom: 1.5rem;
    padding: 0.9rem 1.15rem;
    border-radius: var(--radius-field);
}

.ss-alert ul { margin: 0; padding-left: 1.2rem; }
.ss-alert-error { background: #fdecee; color: var(--error); font-weight: 400; }
.ss-alert-info { background: var(--icon-bg); border-radius: var(--radius-bubble); }
.ss-alert-success { background: var(--icon-bg); color: var(--green-dark); font-weight: 400; }
.ss-alert-warning { background: #fff6dc; color: #5c4400; }
.validation-summary-valid { display: none; }
.validation-summary-errors ul { list-style: none; padding: 0; }

/* Buttons: the website's speech-bubble shape and green gradient. ---------- */
.ss-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-top: 0.5rem; }

.ss-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    min-height: 2.9rem;
    padding: 0.6rem 1.4rem;
    border: 0;
    border-radius: var(--radius-bubble);
    background: linear-gradient(90deg, var(--green), var(--btn-to));
    color: var(--black);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.ss-button .ss-chev { width: 6px; height: 10px; fill: currentColor; transition: transform 0.25s var(--ease-out); }
.ss-button:hover { background: var(--green-dark); color: #fff; }
.ss-button:hover .ss-chev { transform: translateX(3px); }
.ss-button:active { transform: translateY(1px); }

.ss-button:disabled,
.ss-button:disabled:hover { background: var(--grey-light); color: var(--grey-dark); cursor: progress; transform: none; }
.ss-button:disabled .ss-chev { transform: none; }

.ss-button-outline {
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--green);
}

.ss-button-outline:hover { background: transparent; color: var(--black); box-shadow: inset 0 0 0 1px var(--green-dark); }

.ss-button-danger { background: var(--error); color: #fff; }
.ss-button-danger:hover { background: #8f0013; }

.ss-button-danger-outline { background: transparent; color: var(--error); box-shadow: inset 0 0 0 1px var(--error); }
.ss-button-danger-outline:hover { background: var(--error); color: #fff; box-shadow: none; }

/* A button that looks like a link, for small actions such as copying. */
.ss-link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--green-dark);
    font: inherit;
    font-size: 1rem;
    font-weight: 400;
    text-decoration: underline;
    cursor: pointer;
}


/* Authenticator and recovery code pages ---------------------------------- */
.ss-card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

/* Numbered steps: the numbers sit in green speech bubbles, like the ticks. */
.ss-steps {
    list-style: none;
    counter-reset: step;
    margin: 2rem 0 0;
    padding: 0;
    display: grid;
    gap: 2rem;
}

.ss-steps > li {
    counter-increment: step;
    display: grid;
    grid-template-columns: 2.25rem 1fr;
    column-gap: 1rem;
}

.ss-steps > li::before {
    content: counter(step);
    grid-row: span 10;
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50% 50% 50% 0;
    background: var(--green);
    font-weight: 700;
}

.ss-steps > li > * { grid-column: 2; }
.ss-steps p { margin-bottom: 0.75rem; }
.ss-steps a { color: var(--green-dark); font-weight: 400; }
.ss-steps form { margin-top: 0.5rem; }

.ss-qr {
    width: fit-content;
    margin: 0.75rem 0 1rem;
    padding: 0.75rem;
    background: var(--paper);
    border: 1px solid var(--grey-light);
    border-radius: var(--radius-field);
}

.ss-qr img, .ss-qr canvas { display: block; }

.ss-key-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; }

.ss-key {
    padding: 0.35rem 0.7rem;
    background: var(--grey-bg);
    border-radius: 0.4rem;
    font-family: var(--mono);
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.ss-recovery-codes {
    list-style: none;
    margin: 0 0 1rem;
    padding: 1rem 1.25rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    gap: 0.5rem 1.5rem;
    background: var(--grey-bg);
    border-radius: var(--radius-field);
    font-family: var(--mono);
    font-size: 1.05rem;
}

.ss-recovery-codes + .ss-key-row { margin-bottom: 1.75rem; }

/* The list of two-factor methods on the Security page. */
.ss-methods { margin-top: 1.5rem; border-top: 1px solid var(--grey-light); }

.ss-method {
    display: grid;
    grid-template-columns: 2.25rem 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--grey-light);
}

.ss-method-icon {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0.45rem;
    border-radius: 50% 50% 50% 0;
    background: var(--icon-bg);
    fill: none;
    stroke: var(--green-dark);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ss-method-content p { margin: 0; font-size: 1rem; }
.ss-method-content .ss-error { margin-top: 0.25rem; }
/* Buttons stacked, with a smaller action such as Remove centred underneath. */
.ss-method-actions { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }

@media (max-width: 34rem) {
    .ss-method { grid-template-columns: 2.25rem 1fr; }
    .ss-method-actions { grid-column: 2; align-items: flex-start; }
}

.ss-section { margin-top: 1.75rem; }
.ss-help.ss-section a { color: var(--error); }

.ss-select {
    width: 100%;
    max-width: 22rem;
    padding: 0.7rem 1rem;
    font: inherit;
    font-weight: 400;
    background: var(--paper);
    border: 1px solid var(--grey-light);
    border-radius: var(--radius-field);
}

/* Honeypot: hidden from people, visible to naive bots. */
.ss-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

