/* ==========================================================================
   SECURUS ONE - Core theme
   Design tokens + shared components (buttons, fields, alerts, brand mark).
   Colours and shapes are taken from the SECURUS mobile app screens.
   ========================================================================== */

:root {
    /* Brand reds */
    --sec-red: #E4121A;
    --sec-red-bright: #FF2A33;
    --sec-red-deep: #B60C13;
    --sec-red-tint: #FDE8E9;
    --sec-red-wash: #FFF5F5;

    /* Dark hero */
    --sec-navy: #0B1120;
    --sec-navy-2: #151D30;
    --sec-navy-3: #241018;

    /* Neutrals */
    --sec-ink: #14161C;
    --sec-ink-2: #3A3F4A;
    --sec-muted: #8B909A;
    --sec-border: #ECECF0;
    --sec-surface: #FFFFFF;
    --sec-canvas: #FFFFFF;

    /* Shape */
    --sec-radius-sm: 10px;
    --sec-radius: 14px;
    --sec-radius-lg: 18px;
    --sec-radius-pill: 999px;

    /* Elevation */
    --sec-shadow-sm: 0 2px 8px rgba(20, 22, 28, .05);
    --sec-shadow: 0 10px 30px rgba(20, 22, 28, .08);
    --sec-shadow-red: 0 12px 26px rgba(228, 18, 26, .32);

    /* Type */
    --sec-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --sec-font-display: 'Barlow Condensed', 'Arial Narrow', 'Segoe UI', sans-serif;

    --sec-navbar-h: 68px;
    --sec-sidebar-w: 254px;
}

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

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--sec-font-body);
    font-size: 15px;
    line-height: 1.55;
    color: var(--sec-ink);
    background: var(--sec-canvas);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--sec-red);
    text-decoration: none;
}

    a:hover {
        color: var(--sec-red-deep);
    }

img,
svg {
    max-width: 100%;
}

/* --------------------------------------------------------------------------
   Flaticon UIcons
   Icons are written as <i class="fi fi-rr-name">. The UIcons stylesheet puts
   the glyph on the :before pseudo-element, so the <i> itself only has to line
   up with the text around it. Everything sizes with font-size - an icon font
   ignores width and height.
   -------------------------------------------------------------------------- */
.fi,
[class*="fi-rr-"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex: 0 0 auto;
}

    .fi:before {
        line-height: 1;
    }

/* our components set display on elements that may also carry [hidden] */
[hidden] {
    display: none !important;
}

button {
    font-family: inherit;
}

/* --------------------------------------------------------------------------
   Brand wordmark  ->  SECU[R]US  with the R in red
   -------------------------------------------------------------------------- */
.sec-brand {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.sec-brand__word {
    font-family: var(--sec-font-display);
    font-weight: 700;
    font-size: 44px;
    line-height: 1;
    letter-spacing: .18em;
    text-indent: .18em; /* balances the trailing letter-spacing */
    color: #FFFFFF;
    text-transform: uppercase;
}

.sec-brand__word em {
    font-style: normal;
    color: var(--sec-red-bright);
}

.sec-brand__sub {
    font-family: var(--sec-font-display);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .42em;
    text-indent: .42em;
    line-height: 1;
    color: var(--sec-red-bright);
    text-transform: uppercase;
}

.sec-brand--sm .sec-brand__sub {
    font-size: 9px;
    letter-spacing: .34em;
    text-indent: .34em;
}

.sec-brand__tagline {
    font-family: var(--sec-font-display);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: .28em;
    text-indent: .28em;
    color: rgba(255, 255, 255, .82);
    text-transform: uppercase;
}

.sec-brand--sm .sec-brand__word {
    font-size: 26px;
}

.sec-brand--sm .sec-brand__sub {
    font-family: var(--sec-font-display);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .42em;
    text-indent: .42em;
    line-height: 1;
    color: var(--sec-red-bright);
    text-transform: uppercase;
}

.sec-brand--sm .sec-brand__sub {
    font-size: 9px;
    letter-spacing: .34em;
    text-indent: .34em;
}

.sec-brand__tagline {
    font-size: 8px;
    letter-spacing: .22em;
    text-indent: .22em;
}

/* --------------------------------------------------------------------------
   Headings
   -------------------------------------------------------------------------- */
.sec-title {
    font-family: var(--sec-font-display);
    font-weight: 700;
    font-size: 34px;
    line-height: 1.1;
    letter-spacing: .01em;
    color: var(--sec-ink);
    margin: 0 0 8px;
}

    .sec-title em {
        font-style: normal;
        color: var(--sec-red);
    }

.sec-subtitle {
    margin: 0;
    font-size: 15px;
    color: var(--sec-muted);
}

.sec-section-title {
    font-family: var(--sec-font-display);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: .02em;
    color: var(--sec-ink);
    margin: 0;
}

/* --------------------------------------------------------------------------
   Round icon badge (shield / person-plus above the title)
   -------------------------------------------------------------------------- */
.sec-badge-icon {
    width: 62px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: var(--sec-red-tint);
    color: var(--sec-red);
    margin: 0 auto 18px;
}

    .sec-badge-icon .fi {
        font-size: 30px;
    }

/* --------------------------------------------------------------------------
   Form fields
   -------------------------------------------------------------------------- */
.sec-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sec-field {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 58px;
    background: var(--sec-surface);
    border: 1px solid var(--sec-border);
    border-radius: var(--sec-radius);
    box-shadow: var(--sec-shadow-sm);
    transition: border-color .18s ease, box-shadow .18s ease;
}

    .sec-field:focus-within {
        border-color: var(--sec-red);
        box-shadow: 0 0 0 4px rgba(228, 18, 26, .10);
    }

    .sec-field.is-invalid {
        border-color: var(--sec-red);
        background: #FFFCFC;
    }

.sec-field__icon {
    flex: 0 0 auto;
    width: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sec-red);
}

    .sec-field__icon .fi {
        font-size: 20px;
    }

/* thin separator between the icon and the text, as on the sign-in screen */
.sec-field--divided .sec-field__icon::after {
    content: "";
    position: absolute;
    left: 54px;
    top: 14px;
    bottom: 14px;
    width: 1px;
    background: var(--sec-border);
}

.sec-field--divided .sec-field__input {
    padding-left: 14px;
}

.sec-field__input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    color: var(--sec-ink);
    padding: 16px 16px 16px 0;
}

    .sec-field__input::placeholder {
        color: #A9AEB7;
    }

/* native select styled to match the text inputs */
select.sec-field__input {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 44px;
    color: var(--sec-ink);
}

    select.sec-field__input:invalid,
    select.sec-field__input.is-placeholder {
        color: #A9AEB7;
    }

.sec-field__chevron {
    position: absolute;
    right: 18px;
    pointer-events: none;
    color: var(--sec-ink-2);
    display: flex;
}

    .sec-field__chevron .fi {
        font-size: 16px;
    }

/* eye button on password fields */
.sec-field__toggle {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: var(--sec-ink-2);
    padding: 0 18px;
    display: flex;
    align-items: center;
    height: 100%;
}

    .sec-field__toggle:hover {
        color: var(--sec-red);
    }

    .sec-field__toggle .fi {
        font-size: 20px;
    }

/* phone field: dial-code select + divider + number input */
.sec-field--phone .sec-dial {
    flex: 0 0 auto;
    position: relative;
    display: flex;
    align-items: center;
}

.sec-dial__select {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    outline: 0;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: var(--sec-ink);
    padding: 0 24px 0 0;
    cursor: pointer;
}

.sec-dial__chevron {
    position: absolute;
    right: 4px;
    pointer-events: none;
    color: var(--sec-ink-2);
    display: flex;
}

    .sec-dial__chevron .fi {
        font-size: 14px;
    }

.sec-field__divider {
    flex: 0 0 auto;
    width: 1px;
    align-self: stretch;
    margin: 14px 14px 14px 14px;
    background: var(--sec-border);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.sec-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    cursor: pointer;
    font-family: var(--sec-font-body);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .01em;
    padding: 18px 26px;
    border-radius: var(--sec-radius-lg);
    transition: transform .15s ease, box-shadow .18s ease, background .18s ease;
}

/* A button that is not usable yet.

   aria-disabled rather than the disabled attribute, on purpose: a disabled
   button swallows the click, so it can never tell anyone WHY it is disabled.
   This one still fires, and the script explains what is missing. */
.sec-btn[aria-disabled="true"] {
    opacity: .5;
    box-shadow: none;
    filter: grayscale(.5);
    cursor: not-allowed;
}

    .sec-btn[aria-disabled="true"]:hover,
    .sec-btn[aria-disabled="true"]:active {
        transform: none;
        box-shadow: none;
    }

/* The real disabled attribute, wherever it is still used. */
.sec-btn:disabled {
    opacity: .5;
    box-shadow: none;
    filter: grayscale(.5);
    cursor: not-allowed;
}

.sec-btn--primary {
    width: 100%;
    position: relative;
    color: #FFFFFF;
    background: linear-gradient(100deg, var(--sec-red-bright) 0%, var(--sec-red) 45%, var(--sec-red-deep) 100%);
    box-shadow: var(--sec-shadow-red);
}

    .sec-btn--primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 16px 30px rgba(228, 18, 26, .38);
    }

    .sec-btn--primary:active {
        transform: translateY(0);
    }

.sec-btn__arrow {
    position: absolute;
    right: 24px;
    display: flex;
}

    .sec-btn__arrow .fi {
        font-size: 18px;
    }

.sec-btn--ghost {
    background: rgba(255, 255, 255, .14);
    color: #FFFFFF;
    padding: 12px;
    border-radius: var(--sec-radius);
}

    .sec-btn--ghost:hover {
        background: rgba(255, 255, 255, .24);
    }

/* --------------------------------------------------------------------------
   Links, dividers, helper rows
   -------------------------------------------------------------------------- */
.sec-link-strong {
    color: var(--sec-red);
    font-weight: 700;
}

.sec-forgot {
    display: flex;
    justify-content: flex-end;
    margin-top: -4px;
}

.sec-or {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 26px 0 18px;
    color: var(--sec-muted);
    font-size: 14px;
}

    .sec-or::before,
    .sec-or::after {
        content: "";
        flex: 1 1 auto;
        height: 1px;
        background: var(--sec-border);
    }

.sec-swap {
    text-align: center;
    font-size: 15px;
    color: var(--sec-ink-2);
}

    .sec-swap a {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        font-weight: 700;
    }

    .sec-swap .fi {
        font-size: 14px;
    }

/* --------------------------------------------------------------------------
   Alerts + validation
   -------------------------------------------------------------------------- */
.sec-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 16px;
    border-radius: var(--sec-radius);
    font-size: 14px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

    .sec-alert .fi {
        font-size: 18px;
        flex: 0 0 auto;
        margin-top: 1px;
    }

.sec-alert--error {
    background: var(--sec-red-tint);
    border-color: #F6C6C8;
    color: #96070D;
}

.sec-alert--success {
    background: #E9F7EF;
    border-color: #BFE6CE;
    color: #14683A;
}

.sec-alert ul {
    margin: 0;
    padding-left: 18px;
}

.field-validation-error,
.sec-field-error {
    display: block;
    margin: -2px 0 0 6px;
    font-size: 13px;
    color: var(--sec-red);
}

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

.input-validation-error {
    color: var(--sec-ink);
}

.sec-field:has(.input-validation-error) {
    border-color: var(--sec-red);
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.sec-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sec-text-center {
    text-align: center;
}

.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.15rem 0.25rem 0.15rem 0;
}

.compact-select {
    min-width: 11rem;
    width: auto;
}

.form-field--wide {
    grid-column: 1 / -1;
}
