/**
 * THE BUNKER - Unified Popup Styles
 * Estilos compartidos para los popups de efectos y requisitos
 */

/* === OVERLAY === */
.bunker-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    display: none;
    backdrop-filter: blur(2px);
}

.bunker-popup-overlay.visible {
    display: block;
}

/* === BASE POPUP === */
.bunker-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
    border-radius: 12px;
    padding: 20px;
    z-index: 1000;
    min-width: 480px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: none;
}

.bunker-popup.visible {
    display: block;
    animation: popupFadeIn 0.2s ease-out;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* === POPUP VARIANTS === */
.bunker-popup.effects-popup {
    border: 2px solid #ffc107;
}

.bunker-popup.effects-popup h3 {
    color: #ffc107;
}

.bunker-popup.requires-popup {
    border: 2px solid #9c27b0;
}

.bunker-popup.requires-popup h3 {
    color: #9c27b0;
}

/* === HEADER === */
.bunker-popup h3 {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* === CURRENT ITEMS DISPLAY === */
.bunker-popup-current {
    background: #0d0d1a;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
    min-height: 50px;
    border: 1px solid #2a2a35;
}

.bunker-popup-current-title {
    color: #666;
    font-size: 0.8em;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bunker-popup-current-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bunker-popup-current-empty {
    color: #444;
    font-style: italic;
    font-size: 0.9em;
}

/* === TAGS === */
.bunker-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.85em;
    background: #2a2a35;
    border: 1px solid #3a3a45;
    color: #ccc;
}

.bunker-tag .tag-icon {
    font-size: 0.9em;
}

.bunker-tag .remove-tag {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 1.2em;
    padding: 0;
    margin-left: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.bunker-tag .remove-tag:hover {
    color: #ff6659;
}

/* Tag color variants */
.bunker-tag.positive {
    background: #1b3d1b;
    border-color: #2e7d32;
    color: #81c784;
}

.bunker-tag.negative {
    background: #3d1b1b;
    border-color: #c62828;
    color: #ef9a9a;
}

.bunker-tag.flag {
    background: #2a1a3d;
    border-color: #7b1fa2;
    color: #ce93d8;
}

.bunker-tag.resource {
    background: #1a2a3d;
    border-color: #1976d2;
    color: #90caf9;
}

.bunker-tag.alive {
    background: #1b3d1b;
    border-color: #2e7d32;
    color: #81c784;
}

.bunker-tag.dead {
    background: #2d2d2d;
    border-color: #616161;
    color: #9e9e9e;
}

.bunker-tag.away {
    background: #3d2a1b;
    border-color: #e65100;
    color: #ffcc80;
}

.bunker-tag.present {
    background: #1a2d3d;
    border-color: #0277bd;
    color: #81d4fa;
}

.bunker-tag.relation {
    background: #2d1a3d;
    border-color: #7b1fa2;
    color: #ce93d8;
}

.bunker-tag.noflag {
    background: #3d1a1a;
    border-color: #c62828;
    color: #ef9a9a;
}

/* === SECTIONS === */
.bunker-popup-section {
    margin-bottom: 16px;
}

.bunker-popup-section h4 {
    color: #888;
    font-size: 0.85em;
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #2a2a35;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bunker-popup-section h4 .section-icon {
    font-size: 1.1em;
}

/* === BUTTONS GRID === */
.bunker-popup-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* === ACTION BUTTONS === */
.bunker-popup-btn {
    padding: 7px 14px;
    border: 1px solid #3a3a45;
    border-radius: 6px;
    background: #1a1a2e;
    color: #ccc;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.bunker-popup-btn:hover {
    border-color: #888;
    color: #fff;
    background: #252540;
}

/* Button variants */
.bunker-popup-btn.positive {
    background: #1b3d1b;
    border-color: #2e7d32;
    color: #81c784;
}

.bunker-popup-btn.positive:hover {
    background: #255025;
    border-color: #43a047;
}

.bunker-popup-btn.negative {
    background: #3d1b1b;
    border-color: #c62828;
    color: #ef9a9a;
}

.bunker-popup-btn.negative:hover {
    background: #4d2525;
    border-color: #e53935;
}

.bunker-popup-btn.flag {
    background: #2a1a3d;
    border-color: #7b1fa2;
    color: #ce93d8;
}

.bunker-popup-btn.flag:hover {
    background: #3a254d;
    border-color: #9c27b0;
}

.bunker-popup-btn.resource {
    background: #1a2a3d;
    border-color: #1976d2;
    color: #90caf9;
}

.bunker-popup-btn.resource:hover {
    background: #253545;
    border-color: #2196f3;
}

.bunker-popup-btn.alive {
    background: #1b3d1b;
    border-color: #2e7d32;
    color: #81c784;
}

.bunker-popup-btn.dead {
    background: #2d2d2d;
    border-color: #616161;
    color: #9e9e9e;
}

.bunker-popup-btn.away {
    background: #3d2a1b;
    border-color: #e65100;
    color: #ffcc80;
}

.bunker-popup-btn.present {
    background: #1a2d3d;
    border-color: #0277bd;
    color: #81d4fa;
}

.bunker-popup-btn.relation {
    background: #2d1a3d;
    border-color: #7b1fa2;
    color: #ce93d8;
}

.bunker-popup-btn.noflag {
    background: #3d1a1a;
    border-color: #c62828;
    color: #ef9a9a;
}

/* === CUSTOM INPUT === */
.bunker-popup-custom {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.bunker-popup-custom input {
    flex: 1;
    padding: 8px 12px;
    background: #0d0d1a;
    border: 1px solid #3a3a45;
    border-radius: 6px;
    color: #fff;
    font-family: inherit;
    font-size: 0.9em;
}

.bunker-popup-custom input:focus {
    outline: none;
    border-color: #666;
}

.bunker-popup-custom input::placeholder {
    color: #555;
}

.bunker-popup-custom button {
    padding: 8px 16px;
    background: #2a2a35;
    border: 1px solid #3a3a45;
    border-radius: 6px;
    color: #ccc;
    cursor: pointer;
    font-size: 0.9em;
    white-space: nowrap;
}

.bunker-popup-custom button:hover {
    background: #3a3a45;
    color: #fff;
}

/* === FOOTER ACTIONS === */
.bunker-popup-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #2a2a35;
}

.bunker-popup-actions button {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-popup-cancel {
    background: #3a3a45;
    color: #ccc;
}

.btn-popup-cancel:hover {
    background: #4a4a55;
}

.btn-popup-save {
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-popup-save.effects {
    background: #f9a825;
}

.btn-popup-save.effects:hover {
    background: #fbc02d;
}

.btn-popup-save.requires {
    background: #9c27b0;
}

.btn-popup-save.requires:hover {
    background: #ab47bc;
}

/* === SCROLLBAR === */
.bunker-popup::-webkit-scrollbar {
    width: 8px;
}

.bunker-popup::-webkit-scrollbar-track {
    background: #1a1a2e;
    border-radius: 4px;
}

.bunker-popup::-webkit-scrollbar-thumb {
    background: #3a3a45;
    border-radius: 4px;
}

.bunker-popup::-webkit-scrollbar-thumb:hover {
    background: #4a4a55;
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
    .bunker-popup {
        min-width: calc(100vw - 40px);
        padding: 15px;
    }

    .bunker-popup-grid {
        gap: 4px;
    }

    .bunker-popup-btn {
        padding: 6px 10px;
        font-size: 0.8em;
    }
}
