/**
 * Estilos para el motor de anuncios frontend.
 * Interstitial overlay, slide-up banner, contenedores de banner.
 */

/* ── Banner containers ─────────────────────────────────────────── */

.ad-banner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0;
    overflow: hidden;
}

[data-ad-slot="banner"] {
    min-height: 50px;
}

/* ── Interstitial overlay ──────────────────────────────────────── */

.ad-interstitial-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.ad-interstitial-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.ad-interstitial-box {
    background: var(--bg-card, #1a1d23);
    border-radius: 12px;
    padding: 0;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.ad-interstitial-header {
    display: flex;
    justify-content: flex-end;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
}

.ad-interstitial-timer {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary, #999);
    min-width: 24px;
    text-align: center;
}

.ad-interstitial-close {
    cursor: pointer;
    color: var(--text-primary, #fff);
    font-size: 18px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.2s;
}

.ad-interstitial-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ad-interstitial-content {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    position: relative;
}

.ad-interstitial-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    inset: 0;
    z-index: 1;
}

.ad-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent, #00c8b4);
    border-radius: 50%;
    animation: ad-spin 0.8s linear infinite;
}

@keyframes ad-spin {
    to { transform: rotate(360deg); }
}

.ad-interstitial-ad-wrapper {
    opacity: 0;
    transition: opacity 0.3s ease;
    width: 100%;
}

.ad-interstitial-ad-wrapper.loaded {
    opacity: 1;
}

/* ── Slide-Up banner ───────────────────────────────────────────── */

.ad-slide-up {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--bg-card, #1a1d23);
    border-top: 1px solid var(--border, #2a2d35);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.ad-slide-up.visible {
    transform: translateY(0);
}

.ad-slide-up-close {
    position: absolute;
    top: -32px;
    right: 16px;
    background: var(--bg-card, #1a1d23);
    border: 1px solid var(--border, #2a2d35);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    padding: 4px 12px;
    cursor: pointer;
    color: var(--text-secondary, #999);
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.ad-slide-up-close:hover {
    color: var(--text-primary, #fff);
}

.ad-slide-up-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 16px;
    overflow: hidden;
}

/* ── Direct link buttons ───────────────────────────────────────── */

.ad-direct-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--accent, #00c8b4);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.ad-direct-link-btn:hover {
    opacity: 0.85;
}

/* ── Badges monetizacion admin ─────────────────────────────────── */

.badge-active {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.badge-inactive {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* ── Plan cards en admin ───────────────────────────────────────── */

.plan-details {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 16px 0;
}

.plan-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent, #00c8b4);
}

.plan-coins {
    font-size: 14px;
    color: var(--text-secondary, #999);
}

.plan-duration {
    font-size: 14px;
    color: var(--text-secondary, #999);
}

.plan-desc {
    padding: 8px 16px 16px;
    font-size: 13px;
    color: var(--text-secondary, #999);
    line-height: 1.5;
}

/* ── Payments table ────────────────────────────────────────────── */

.text-mono {
    font-family: monospace;
    font-size: 11px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border, #2a2d35);
    font-size: 13px;
}

.admin-table th {
    font-weight: 600;
    color: var(--text-secondary, #999);
    font-size: 12px;
    text-transform: uppercase;
}

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}