/* ── Image lightbox zoom indicator ────────────────── */

img.zoomable {
    cursor: zoom-in;
    transition: opacity 0.15s;
}
img.zoomable:hover {
    opacity: 0.85;
}

/* ── Location / faction cards with background image ── */

.loc-card {
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.15s;
}
.loc-card--has-bg {
    background-size: cover;
    background-position: center;
    min-height: 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.loc-card--has-bg .loc-card__text {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 4px;
    padding: 0.35rem 0.6rem;
}
.loc-card--has-bg .loc-card__text p {
    color: #363636;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.6);
}
.loc-card--has-bg:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* ── Skip-to-content (accessibility) ─────────────── */

.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 9999;
    padding: 0.5rem 1rem;
    background: #3273dc;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
}
.skip-link:focus {
    top: 0;
}

/* ── Global tweaks ─────────────────────────────────── */

hr {
    margin-top: 2px !important;
}

form label {
    font-size: 0.8em;
    font-weight: bold;
}

/* ── SVG icon color filters ───────────────────────── */

.svg-blue {
    filter: invert(44%) sepia(31%) saturate(3123%) hue-rotate(180deg) brightness(126%) contrast(77%);
    opacity: 80%;
}

.svg-red {
    filter: invert(27%) sepia(65%) saturate(1592%) hue-rotate(312deg) brightness(88%) contrast(144%);
    opacity: 90%;
}

/* ── Card hover elevation ─────────────────────────── */

.box {
    transition: box-shadow 0.2s ease;
}

a.box:hover,
.box.is-hoverable:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* ── Event list styles ────────────────────────────── */

.event-card {
    border: 1px solid #ddd;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 4px;
}

.event-meta {
    color: #666;
    font-size: 0.9em;
}

.event-preview {
    margin: 1rem 0;
}

.character-tag {
    background: #eee;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.9em;
    margin-right: 0.5rem;
}

.status-badge {
    font-size: 0.8em;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.status-badge.open {
    background: #e3f2fd;
    color: #1976d2;
}

.status-badge.unresolved {
    background: #fff3e0;
    color: #f57c00;
}

.status-badge.hooks {
    background: #e8f5e9;
    color: #388e3c;
}

.ai-badge {
    background: #e1bee7;
    color: #7b1fa2;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8em;
    margin-left: 0.5rem;
}

.event-chain {
    margin-top: 0.5rem;
    font-size: 0.9em;
    color: #666;
}

/* ── Danger zone (delete confirmations) ───────────── */

.danger-zone {
    border-left: 4px solid #ff3860;
    padding-left: 1.25rem;
}

/* ── Django messages ──────────────────────────────── */

.messages-container {
    padding: 0.75rem 0;
}

/* ── Form error list ──────────────────────────────── */

.errorlist {
    color: #c62828;
    margin: 0.25rem 0;
    padding-left: 1.5rem;
    font-size: 0.875rem;
}

/* ── Extracted utility classes ───────────────────── */

/* Navbar: unstyled button inside a dropdown item */
.btn-unstyled {
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

/* Campaign cards: equal-height flex column */
.card-flex {
    display: flex;
    flex-direction: column;
}
.card-flex .card-content {
    flex: 1;
    min-height: 16rem;
}

/* Campaign card: active border highlight */
.card-flex.is-active-campaign {
    border: 2px solid #3273dc;
}

/* Card footer: unstyled select button */
.card-footer-item.btn-select {
    background: none;
    border: none;
    border-top: 1px solid #ededed;
    cursor: pointer;
    color: #3273dc;
    font-size: 1rem;
}

/* AI draft / branch accent stripe */
.ai-draft {
    border-left: 3px solid #3273dc;
}

/* Sortable table column header */
.sort-header {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

/* Narrower page container (char sheet, voting) */
.container-narrow {
    max-width: 860px;
}

/* Image figure cap */
.image-cap {
    max-width: 320px;
}

/* Inline form (no extra spacing) */
.form-inline {
    display: inline;
}
.form-inline-block {
    display: inline-block;
    margin: 0.1rem;
}

/* ── Virtue tooltip (shared: edit form + read-only sheet) ── */

.vt-info {
    display: inline-block;
    cursor: help;
    color: #3273dc;
    font-size: 0.917rem;
    line-height: 1;
    margin-left: 3px;
    position: relative;
    vertical-align: middle;
}
.vt-info .vt-tip {
    display: none;
    position: absolute;
    top: 1.4em;
    left: 0;
    z-index: 200;
    background: #fff;
    border: 1px solid #3273dc;
    border-radius: 6px;
    padding: 0.5em 0.65em;
    min-width: 230px;
    max-width: 290px;
    font-size: 0.833rem;
    font-weight: normal;
    color: #333;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    white-space: normal;
    line-height: 1.4;
    text-align: left;
}
.vt-info:hover .vt-tip,
.vt-info:focus .vt-tip,
.vt-info.is-active .vt-tip {
    display: block;
}
.vt-tip-current { color: #1a5ab8; }
.vt-tip-pending { color: #777; }
.vt-tip hr { margin: 4px 0; border-color: #e0e0e0; }
