/* ══════════════════════════════════════════════════════════════
   MÓDULO CIVILIZACIÓN  v1.2.0
   ══════════════════════════════════════════════════════════════ */
.civ-widget--active {
    background: rgba(255,255,255,.12);
    border-color: rgba(192,57,43,.7);
}

.civ-header-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.civ-widget {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    transition: background .2s, border-color .2s;
    min-width: 70px;
    position: relative;
}
.civ-widget:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(192,57,43,.5);
}
.civ-widget__icon {
    width: 16px; height: 16px;
    flex-shrink: 0;
}
.civ-widget__icon svg { width: 100%; height: 100%; }
.civ-widget__amount {
    font-size: .8rem;
    font-weight: 700;
    color: #e8e8e8;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.civ-widget--civiles .civ-widget__icon   { color: #3498db; }
.civ-widget--militares .civ-widget__icon { color: #e74c3c; }

/* ── Tooltip ─────────────────────────────────────────────── */
.civ-tooltip {
    position: fixed;
    background: rgba(10,10,10,.95);
    border: 1px solid rgba(192,57,43,.5);
    border-radius: 8px;
    padding: 12px 14px;
    min-width: 210px;
    z-index: 1000;
    pointer-events: none;
    display: none;
    backdrop-filter: blur(6px);
    box-shadow: 0 8px 24px rgba(0,0,0,.6);
}
.civ-tooltip--visible { display: block; }
.civ-tooltip__title {
    font-weight: 700;
    font-size: .88rem;
    color: #c0392b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.civ-tooltip__row {
    display: flex;
    justify-content: space-between;
    font-size: .78rem;
    color: #aaa;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.civ-tooltip__row:last-child  { border-bottom: none; }
.civ-tooltip__row span:last-child { font-weight: 700; color: #e8e8e8; }
.civ-tooltip__row--pos span:last-child { color: #2ecc71; }
.civ-tooltip__row--neg span:last-child { color: #e74c3c; }

.civ-felicidad-bar {
    height: 4px;
    background: rgba(255,255,255,.1);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}
.civ-felicidad-fill {
    height: 100%;
    border-radius: 2px;
    transition: width .3s, background .3s;
}

/* ── Panel de celda – botón Anexar ───────────────────────── */
.civ-annex-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 8px 12px;
    background: rgba(52,152,219,.12);
    border: 1px solid rgba(52,152,219,.4);
    border-radius: 6px;
    color: #74b9e8;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, border-color .2s, opacity .2s;
    text-align: left;
}
.civ-annex-btn:hover:not(:disabled) {
    background: rgba(52,152,219,.22);
    border-color: rgba(52,152,219,.7);
    color: #a8d4f5;
}
.civ-annex-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.civ-annex-cost {
    font-size: .72rem;
    color: #f39c12;
    background: rgba(243,156,18,.12);
    border-radius: 3px;
    padding: 1px 5px;
    font-weight: 700;
}
.civ-annex-time {
    font-size: .72rem;
    color: #aaa;
    background: rgba(255,255,255,.06);
    border-radius: 3px;
    padding: 1px 5px;
}

/* ── Progreso / cuenta regresiva ─────────────────────────── */
.civ-annex-progress {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 6px;
    font-size: .78rem;
    color: #aaa;
    width: 100%;
}
.civ-annex-progress span { flex: 1; }

/* ── Badge "Tu territorio" ───────────────────────────────── */
.civ-territory-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    background: rgba(52,152,219,.08);
    border: 1px solid rgba(52,152,219,.25);
    border-radius: 6px;
    font-size: .78rem;
    color: #74b9e8;
    width: 100%;
}
.civ-territory-badge--new {
    background: rgba(46,204,113,.1);
    border-color: rgba(46,204,113,.3);
    color: #2ecc71;
    animation: civ-flash .6s ease 2;
}

/* ── Error inline ────────────────────────────────────────── */
.civ-annex-error {
    padding: 7px 10px;
    background: rgba(231,76,60,.1);
    border: 1px solid rgba(231,76,60,.3);
    border-radius: 6px;
    font-size: .78rem;
    color: #e74c3c;
    width: 100%;
}

/* ── Animaciones ─────────────────────────────────────────── */
@keyframes civ-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes civ-flash {
    0%, 100% { opacity: 1; }
    50%       { opacity: .5; }
}
