/* ==========================================================================
   Talgild rokning – Gjaldstovan
   Mobile-first. Light/dark via tokens: follows the OS unless the user picks
   a theme (html[data-theme]). Brand: Gjaldstovan gold + fjord blue.
   ========================================================================== */

:root {
    --bg: #edf1f4;
    --surface: #ffffff;
    --field: #fbfcfd;
    --ink: #14212b;
    --muted: #556674;
    --line: #d3dce3;
    --line-strong: #b4c1cb;

    --primary: #0a6e9c;
    --primary-hover: #075a80;
    --primary-ink: #ffffff;
    --primary-soft: #e3f0f6;

    --gold: #aa8a00;
    --gold-ink: #7a6300;

    --danger: #b3261e;
    --success: #1e7f4f;
    --success-soft: #e2f3ea;

    --shadow: 0 1px 2px rgba(20, 33, 43, .06), 0 4px 16px rgba(20, 33, 43, .06);
    --shadow-up: 0 -6px 20px rgba(20, 33, 43, .10);
    --focus: 0 0 0 3px rgba(10, 110, 156, .35);

    --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-num: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;

    --radius: 10px;
    --radius-sm: 6px;
    --gap: 1rem;

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0c151c;
        --surface: #13202a;
        --field: #0f1a22;
        --ink: #e4ecf1;
        --muted: #93a7b5;
        --line: #26394a;
        --line-strong: #36506a;

        --primary: #4aafe0;
        --primary-hover: #74c3ea;
        --primary-ink: #04202e;
        --primary-soft: #16344a;

        --gold: #d4af37;
        --gold-ink: #e2c25a;

        --danger: #f2847c;
        --success: #5cc795;
        --success-soft: #143527;

        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .25);
        --shadow-up: 0 -6px 20px rgba(0, 0, 0, .45);
        --focus: 0 0 0 3px rgba(74, 175, 224, .45);

        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #0c151c;
    --surface: #13202a;
    --field: #0f1a22;
    --ink: #e4ecf1;
    --muted: #93a7b5;
    --line: #26394a;
    --line-strong: #36506a;

    --primary: #4aafe0;
    --primary-hover: #74c3ea;
    --primary-ink: #04202e;
    --primary-soft: #16344a;

    --gold: #d4af37;
    --gold-ink: #e2c25a;

    --danger: #f2847c;
    --success: #5cc795;
    --success-soft: #143527;

    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .25);
    --shadow-up: 0 -6px 20px rgba(0, 0, 0, .45);
    --focus: 0 0 0 3px rgba(74, 175, 224, .45);

    color-scheme: dark;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 1rem; /* 16px: keeps iOS from zooming into inputs */
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
}

a:hover {
    color: var(--primary-hover);
}

.num {
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
}

.req {
    color: var(--gold-ink);
    font-weight: 700;
}

:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

.shell {
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1rem;
}

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */

.masthead {
    background: var(--surface);
    border-top: 3px solid var(--gold);
    border-bottom: 1px solid var(--line);
}

.masthead__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 4rem;
}

.brand {
    display: inline-flex;
    border-radius: var(--radius-sm);
}

.brand img {
    display: block;
    height: 40px;
    width: auto;
}

/* The logo is drawn for a light background: give it a light plate in dark mode */
:root[data-theme="dark"] .brand {
    background: #f4f6f8;
    padding: 4px 8px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .brand {
        background: #f4f6f8;
        padding: 4px 8px;
    }
}

.theme-toggle {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--field);
    color: var(--ink);
    font-size: 1.125rem;
    cursor: pointer;
}

.theme-toggle:hover {
    border-color: var(--line-strong);
}

/* --------------------------------------------------------------------------
   Page head
   -------------------------------------------------------------------------- */

.page-head {
    padding: 1.5rem 0 .5rem;
}

.page-head h1 {
    margin: 0;
    font-size: 1.625rem;
    font-weight: 750;
    letter-spacing: -.02em;
    line-height: 1.15;
}

.page-head__note {
    margin: .375rem 0 0;
    color: var(--muted);
    font-size: .9375rem;
}

/* --------------------------------------------------------------------------
   Layout: one column on phones, two columns from tablet up
   -------------------------------------------------------------------------- */

.layout,
.layout__stack {
    display: grid;
    gap: var(--gap);
    min-width: 0;
}

.layout {
    padding-bottom: 1rem;
}

@media (min-width: 768px) {
    .layout {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .layout__settings,
    .layout__lines,
    .layout__attachment {
        grid-column: 1 / -1;
    }
}

/* --------------------------------------------------------------------------
   Panels (sections). The gold rule is the old "callout" border, kept as the brand mark.
   -------------------------------------------------------------------------- */

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem 1rem;
    min-width: 0;
}

@media (min-width: 576px) {
    .panel {
        padding: 1.5rem;
    }
}

.panel h2 {
    display: flex;
    align-items: center;
    gap: .625rem;
    margin: 0 0 1rem;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -.005em;
    color: var(--ink);
}

.panel h2::before {
    content: "";
    width: 4px;
    height: 1.125em;
    border-radius: 2px;
    background: var(--gold);
}

.subhead {
    margin: 1.25rem 0 .75rem;
    font-size: .8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
}

/* --------------------------------------------------------------------------
   Field grid: 6 columns. Phones stack most fields; short fields pair up.
   -------------------------------------------------------------------------- */

.fields {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: .75rem;
}

.f-full,
.f-half {
    grid-column: span 6;
}

.f-wide {
    grid-column: span 4;
}

.f-narrow {
    grid-column: span 2;
}

@media (min-width: 576px) {
    .f-half {
        grid-column: span 3;
    }
}

.form-group {
    margin-bottom: 1rem;
    min-width: 0;
}

label {
    display: block;
    margin-bottom: .3125rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--ink);
}

.form-control {
    min-height: 44px;
    padding: .5rem .75rem;
    font-size: 1rem;
    color: var(--ink);
    background-color: var(--field);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.form-control:focus {
    color: var(--ink);
    background-color: var(--field);
    border-color: var(--primary);
    box-shadow: var(--focus);
}

.form-control::placeholder {
    color: var(--muted);
    opacity: .75;
}

.form-control:disabled,
.form-control[disabled] {
    background-color: var(--bg);
    color: var(--muted);
    opacity: 1;
}

textarea.form-control {
    min-height: 6rem;
    resize: vertical;
}

/* Validation (formvalidation.io bootstrap framework emits .has-error / .help-block) */
.has-error .form-control,
.has-error .selectize-input {
    border-color: var(--danger) !important;
}

.has-error label {
    color: var(--danger);
}

.help-block {
    display: block;
    margin-top: .3125rem;
    font-size: .8125rem;
    line-height: 1.35;
    color: var(--danger);
}

/* Checkbox */
.check {
    display: inline-flex;
    align-items: center;
    gap: .625rem;
    min-height: 44px;
    margin: 0;
    font-weight: 500;
    cursor: pointer;
}

.check input {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary);
}

/* Document type + number */
.combo {
    display: flex;
    min-width: 0;
}

.combo__select {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 2rem 0 .75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23889aa8'/%3E%3C/svg%3E") no-repeat right .75rem center;
    border: 1px solid var(--line-strong);
    border-right: 0;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    -webkit-appearance: none;
    appearance: none;
}

.combo__input {
    flex: 1 1 auto;
    min-width: 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* --------------------------------------------------------------------------
   Receiver search (Selectize)
   -------------------------------------------------------------------------- */

.selectize-control {
    min-width: 0;
}

.selectize-control.single .selectize-input,
.selectize-control.single .selectize-input.input-active,
.selectize-input,
.selectize-input.full {
    min-height: 44px;
    padding: .625rem .75rem;
    font-size: 1rem;
    color: var(--ink);
    background: var(--field);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    box-shadow: none;
}

.selectize-input.focus {
    border-color: var(--primary);
    box-shadow: var(--focus);
}

.selectize-input > input {
    color: var(--ink);
    font-size: 1rem !important;
}

.selectize-input > input::placeholder {
    color: var(--muted);
}

.selectize-control.single .selectize-input:after {
    border-top-color: var(--muted);
}

.selectize-dropdown {
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: var(--shadow);
    font-size: 1rem;
}

.selectize-dropdown .active {
    color: var(--ink);
    background: var(--primary-soft);
}

.receiver-option {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    padding: .25rem 0;
}

.receiver-option .fa {
    color: var(--muted);
}

.receiver-option__name {
    flex: 1 1 auto;
    min-width: 0;
}

.receiver-option__gln {
    color: var(--muted);
    font-size: .8125rem;
}

/* --------------------------------------------------------------------------
   Invoice lines. Phones: one card per line. Desktop: a ruled table-like grid.
   -------------------------------------------------------------------------- */

.lines__head {
    display: none;
}

.line {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-areas:
        "tag tag tag tag tag rm"
        "num num num num num num"
        "desc desc desc desc desc desc"
        "amt amt amt cnt cnt cnt"
        "dsc dsc tax tax tot tot";
    column-gap: .625rem;
    padding: .875rem;
    margin-bottom: .75rem;
    background: var(--field);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.line__tag {
    grid-area: tag;
    align-self: center;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
}

.l-num { grid-area: num; }
.l-desc { grid-area: desc; }
.l-amt { grid-area: amt; }
.l-cnt { grid-area: cnt; }
.l-dsc { grid-area: dsc; }
.l-tax { grid-area: tax; }

.line .form-group {
    margin-bottom: .75rem;
}

.l-label {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--muted);
}

.l-tot {
    grid-area: tot;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    margin-bottom: .75rem;
}

.l-tot output {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 44px;
    font-weight: 700;
    font-size: 1rem;
}

.line__remove {
    grid-area: rm;
    justify-self: end;
    align-self: center;
    width: 44px;
    height: 44px;
    margin: -.5rem -.5rem 0 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--danger);
    font-size: 1.125rem;
    cursor: pointer;
}

.line__remove:hover:not(:disabled) {
    background: rgba(179, 38, 30, .08);
}

.line__remove:disabled {
    color: var(--line-strong);
    cursor: not-allowed;
}

@media (min-width: 576px) {
    .line {
        grid-template-areas:
            "tag tag tag tag tag rm"
            "num num desc desc desc desc"
            "amt amt amt cnt cnt cnt"
            "dsc dsc tax tax tot tot";
    }
}

@media (min-width: 992px) {
    .lines__head,
    .line {
        grid-template-columns: 8rem minmax(10rem, 1fr) 8.5rem 4.5rem 6.5rem 5.5rem 8rem 2.75rem;
        column-gap: .5rem;
    }

    .lines__head {
        display: grid;
        padding: 0 0 .5rem;
        border-bottom: 1px solid var(--line-strong);
        font-size: .75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .06em;
        color: var(--muted);
    }

    .lines__head .num-col {
        text-align: right;
    }

    .line {
        grid-template-areas: "num desc amt cnt dsc tax tot rm";
        align-items: start;
        padding: .625rem 0 0;
        margin: 0;
        background: transparent;
        border: 0;
        border-bottom: 1px solid var(--line);
        border-radius: 0;
    }

    .line__tag {
        display: none;
    }

    .line .form-group {
        margin-bottom: .625rem;
    }

    .line .num {
        text-align: right;
    }

    /* The column header labels the fields visually; keep labels for assistive tech */
    .l-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .l-tot {
        margin-bottom: .625rem;
    }

    .line__remove {
        margin: 0;
        align-self: start;
    }
}

.btn-add {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    margin-top: .75rem;
    padding: 0 1rem;
    border: 1px dashed var(--primary);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
}

.btn-add:hover {
    background: var(--primary-soft);
}

/* Totals */
.totals {
    margin: 1.25rem 0 1.25rem auto;
    max-width: 22rem;
}

.totals > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .375rem 0;
    border-bottom: 1px solid var(--line);
}

.totals dt {
    font-weight: 500;
    color: var(--muted);
}

.totals dd {
    margin: 0;
}

.totals__grand {
    border-bottom: 3px double var(--line-strong) !important;
}

.totals__grand dt,
.totals__grand dd {
    font-weight: 700;
    color: var(--ink);
}

/* --------------------------------------------------------------------------
   Attachment
   -------------------------------------------------------------------------- */

.dropzone {
    padding: 1rem;
    border: 2px dashed var(--line-strong);
    border-radius: var(--radius);
    background: var(--field);
    transition: border-color .15s ease, background-color .15s ease;
}

.dropzone.hover {
    border-color: var(--primary);
    border-style: solid;
    background: var(--primary-soft);
}

.dropzone__hint {
    margin: 0 0 .75rem;
    font-weight: 600;
    text-align: center;
    color: var(--muted);
}

.dropzone__limit {
    margin: .625rem 0 0;
    font-size: .8125rem;
    color: var(--muted);
}

/* Drag and drop is a pointer affordance: phones only get the picker */
@media (hover: none) {
    .dropzone__hint {
        display: none;
    }
}

.file-picker {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.file-picker__name {
    flex: 1 1 12rem;
    min-width: 0;
}

.file-picker__buttons {
    display: flex;
    gap: .5rem;
}

.custom-file-input-button {
    position: relative;
    overflow: hidden;
}

.custom-file-input-button input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.btn:focus,
.btn.focus {
    box-shadow: var(--focus);
}

.btn-primary {
    color: var(--primary-ink);
    background: var(--primary);
    border: 1px solid var(--primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active {
    color: var(--primary-ink);
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-primary:disabled {
    color: var(--primary-ink);
    background: var(--primary);
    border-color: var(--primary);
    opacity: .55;
}

.btn-ghost {
    color: var(--ink);
    background: transparent;
    border: 1px solid var(--line-strong);
}

.btn-ghost:hover {
    color: var(--ink);
    background: var(--field);
    border-color: var(--muted);
}

.btn-soft {
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid transparent;
}

.btn-soft:hover {
    color: var(--primary-hover);
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--primary);
    font-size: .9375rem;
    text-decoration: underline;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   Tally: the running total + actions, stuck to the bottom of the viewport
   -------------------------------------------------------------------------- */

.tally {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
    margin: 0 -1rem;
    padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: var(--shadow-up);
}

.tally__sum {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.tally__label {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
}

.tally__amount {
    font-size: 1.375rem;
    font-weight: 700;
}

.tally__amount small {
    font-size: .875rem;
    font-weight: 500;
    color: var(--muted);
}

.tally__actions {
    display: flex;
    gap: .5rem;
}

.tally__actions .btn-primary {
    min-width: 7.5rem;
}

@media (min-width: 768px) {
    .tally {
        margin: 0;
        border: 1px solid var(--line);
        border-bottom: 0;
        border-radius: var(--radius) var(--radius) 0 0;
        padding: .875rem 1.5rem calc(.875rem + env(safe-area-inset-bottom));
    }
}

/* --------------------------------------------------------------------------
   Receipt: a till slip with a torn edge
   -------------------------------------------------------------------------- */

.receipt {
    padding: 2rem 0 1rem;
}

.slip {
    position: relative;
    max-width: 26rem;
    margin: 0 auto 2rem;
    padding: 2rem 1.5rem 1.75rem;
    background: var(--surface);
    border-radius: var(--radius) var(--radius) 0 0;
    filter: drop-shadow(0 4px 12px rgba(20, 33, 43, .12));
    text-align: center;
    animation: slip-print .45s cubic-bezier(.2, .7, .2, 1) both;
}

.slip:focus {
    outline: none;
}

/* Perforated bottom edge */
.slip::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -9px;
    height: 10px;
    background:
        linear-gradient(135deg, var(--surface) 50%, transparent 50%) 0 0 / 14px 10px repeat-x,
        linear-gradient(225deg, var(--surface) 50%, transparent 50%) 0 0 / 14px 10px repeat-x;
}

.slip__stamp {
    display: grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--success-soft);
    color: var(--success);
    font-size: 1.5rem;
}

.slip__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 750;
    letter-spacing: -.02em;
}

.slip__lede {
    margin: .5rem 0 1.5rem;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.slip__lede strong {
    color: var(--ink);
}

.slip__rows {
    margin: 0;
    padding-top: 1rem;
    border-top: 2px dashed var(--line-strong);
    text-align: left;
}

.slip__rows > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .375rem 0;
}

.slip__rows dt {
    font-weight: 500;
    color: var(--muted);
}

.slip__rows dd {
    margin: 0;
    text-align: right;
    overflow-wrap: anywhere;
}

.slip__total {
    margin-top: .5rem;
    padding-top: .75rem !important;
    border-top: 2px dashed var(--line-strong);
}

.slip__total dt,
.slip__total dd {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--ink);
}

.slip__meta {
    margin: 1.25rem 0 0;
    font-size: .75rem;
    color: var(--muted);
}

.receipt__actions {
    display: flex;
    justify-content: center;
}

@keyframes slip-print {
    from {
        opacity: 0;
        transform: translateY(-14px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .slip {
        animation: none;
    }

    .form-control,
    .dropzone {
        transition: none;
    }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
    padding: 2rem 0 2.5rem;
    font-size: .8125rem;
    text-align: center;
    color: var(--muted);
}

.site-footer p {
    margin: 0;
}

/* --------------------------------------------------------------------------
   Modal (Bootstrap 4)
   -------------------------------------------------------------------------- */

.modal-content {
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.modal-header,
.modal-footer {
    border-color: var(--line);
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 700;
}

.close {
    color: var(--ink);
    text-shadow: none;
    opacity: .6;
}

.close:hover {
    color: var(--ink);
}

.sms-sent {
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--primary-soft);
    text-align: center;
}

.code-input {
    font-size: 1.5rem !important;
    letter-spacing: .3em;
    text-align: center;
}

/* --------------------------------------------------------------------------
   Datepicker (bootstrap-datepicker 1.3)
   -------------------------------------------------------------------------- */

.datepicker.dropdown-menu {
    color: var(--ink);
    background: var(--surface);
    border-color: var(--line);
    box-shadow: var(--shadow);
    font-size: .9375rem;
}

.datepicker-dropdown.datepicker-orient-top:after {
    border-top-color: var(--surface);
}

.datepicker-dropdown.datepicker-orient-bottom:after {
    border-bottom-color: var(--surface);
}

.datepicker table tr td.day:hover,
.datepicker table tr td span:hover,
.datepicker .datepicker-switch:hover,
.datepicker .prev:hover,
.datepicker .next:hover,
.datepicker tfoot tr th:hover {
    background: var(--primary-soft);
}

.datepicker table tr td.old,
.datepicker table tr td.new {
    color: var(--muted);
}

.datepicker table tr td.today,
.datepicker table tr td.today:hover {
    color: var(--ink);
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--gold);
}

.datepicker table tr td.active,
.datepicker table tr td.active:hover,
.datepicker table tr td.active.active,
.datepicker table tr td span.active,
.datepicker table tr td span.active:hover {
    color: var(--primary-ink);
    background: var(--primary);
    text-shadow: none;
}

/* --------------------------------------------------------------------------
   Notifications (bootstrap-growl via farpayNotification.js)
   -------------------------------------------------------------------------- */

[data-growl="container"] {
    max-width: calc(100vw - 2rem);
    padding: .875rem 2.5rem .875rem 1rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}

.alert-farpaySuccess {
    color: var(--success);
    background-color: var(--surface);
    border: 1px solid var(--success);
}

.alert-farpayInfo {
    color: var(--ink);
    background-color: var(--surface);
    border: 1px solid var(--primary);
}

.alert-farpayError {
    color: var(--danger);
    background-color: var(--surface);
    border: 1px solid var(--danger);
}

.alert-farpayWarning {
    color: var(--gold-ink);
    background-color: var(--surface);
    border: 1px solid var(--gold);
}
