/* ── Brand tokens (from bugnbrag-logo.svg) ───────────────── */
:root {
    --brand-navy: #1E3A5F;
    --brand-blue: #4A90D9;
    --brand-green: #2A7A48;
    --brand-red: #E03E2D;
    --brand-gold: #F5C518;
    /* Derived */
    --brand-navy-dark: #162d4a; /* navy darkened ~10% for gradients  */
    --brand-green-dark: #1e5c35; /* green darkened for text on light   */
    --brand-blue-light: #dceeff; /* blue tinted for success bg         */
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    font-size: 16px;
    color: #222;
    background: #f0f2f5;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ── Blazor Error UI ──────────────────────────────────────── */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--brand-green);
}

.invalid {
    outline: 1px solid var(--brand-red);
}

.validation-message {
    color: var(--brand-red);
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDk [...] 6cy41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ── Shared button utilities ──────────────────────────────────── */
.btn-save,
.btn-cancel {
    border: none;
    border-radius: 5px;
    padding: 0.28rem 0.7rem;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}

.btn-save {
    background: var(--brand-blue-light);
    color: var(--brand-navy);
}

    .btn-save:hover:not(:disabled) {
        background: var(--brand-blue);
        color: #fff;
    }

    .btn-save:disabled {
        opacity: 0.45;
        cursor: default;
    }

.btn-cancel {
    background: #f5f5f5;
    color: #555;
}

    .btn-cancel:hover {
        background: #e8e8e8;
    }

/* Destructive confirm button — used in modal and inline card/comment deletes */
.btn-confirm-delete {
    border: none;
    border-radius: 5px;
    padding: 0.28rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    background: var(--brand-red);
    color: #fff;
}

    .btn-confirm-delete:hover {
        background: #c0392b;
    }

    /* Larger variants for use inside modals */
    .btn-confirm-delete.btn-lg,
    .btn-cancel.btn-lg {
        padding: 0.55rem 1.25rem;
        font-size: 0.9rem;
        border-radius: 6px;
    }

.btn-icon-sm {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.2rem 0.25rem;
    border-radius: 4px;
    line-height: 1;
    opacity: 0.55;
    transition: opacity 0.15s, background 0.15s;
}

    .btn-icon-sm:hover {
        opacity: 1;
        background: rgba(74, 144, 217, 0.1); /* --brand-blue tint */
    }

.btn-danger-sm:hover {
    background: rgba(224, 62, 45, 0.12); /* --brand-red tint */
    color: var(--brand-red);
}

/* ── Author visibility toggle ── */
.card-author-row,
.comment-author-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 1.2rem;
    margin-top: 0.1rem;
}

.btn-author-toggle {
    background: none;
    border: none;
    font-size: 0.68rem;
    color: #aaa;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}

    .btn-author-toggle:hover {
        color: #555;
    }

/* ── Nickname visibility toggle (session header) ── */
.btn-nickname-toggle {
    background: none;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 0.28rem 0.7rem;
    font-size: 0.78rem;
    color: #777;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

    .btn-nickname-toggle:hover {
        background: #f0f0f0;
        border-color: #aaa;
        color: #444;
    }

    .btn-nickname-toggle.active {
        background: #d4edda;
        border-color: #a3cfb5;
        color: var(--brand-green-dark);
    }

/* ── Session header buttons ───────────────────────────────────────
   Defined globally (not scoped) so dynamically-added classes like
   .active and .btn-ready-active are matched correctly.
   ─────────────────────────────────────────────────────────────── */
.btn-header {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    border-radius: 6px;
    padding: 0.35rem 0.7rem;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    min-height: 36px;
    transition: background 0.15s, border-color 0.15s;
}

    .btn-header:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.45);
    }

    /* Toggled-on state — bright border + bold text so it reads on navy */
    .btn-header.active {
        background: rgba(255, 255, 255, 0.22);
        border-color: rgba(255, 255, 255, 0.7);
        color: #fff;
        font-weight: 700;
    }

    .btn-header.btn-ready-active {
        background: rgba(42, 122, 72, 0.45);
        border-color: rgba(42, 122, 72, 0.9);
        color: #a3e0bc;
        font-weight: 700;
    }

    .btn-header.btn-timer-active {
        background: rgba(224, 62, 45, 0.35);
        border-color: rgba(224, 62, 45, 0.8);
        color: #ffb3aa;
        font-weight: 700;
    }

    .btn-header.btn-reveal {
        background: rgba(255, 255, 255, 0.08);
    }

        .btn-header.btn-reveal.active {
            background: rgba(74, 144, 217, 0.35);
            border-color: rgba(74, 144, 217, 0.8);
            color: #c8e4ff;
            font-weight: 700;
        }

/* Brand icon bubble — use on images placed over dark/colored backgrounds */
.icon-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}

    .icon-bubble img {
        width: 1.25rem;
        height: 1.25rem;
        display: block;
    }

.form-input-sm {
    width: 5rem;
    padding: 0.2rem 0.4rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.card-followup-pin .followup-pin-icon {
    width: 1.2rem;
    height: 1.2rem;
    display: block;
    transform-origin: center center;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.followup-pin-icon.pin-pinned {
    transform: rotate(0deg);
    opacity: 1;
}

.followup-pin-icon.pin-unpinned {
    transform: rotate(45deg);
    opacity: 0.65;
}
