/* ═══════════════════════════════════════════════════════════════════════════
   1vsM — Tab Descriptions + Help Tooltips
   Dark/gold theme styling for tab description cards and collapsible help.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tab Description Card ─────────────────────────────────────────────── */

.tab-description {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.tab-description-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    color: var(--primary, #d4af37);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-description-title .tab-emoji {
    font-size: 1.2rem;
    line-height: 1;
}

.tab-description-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-muted, #888);
}

.tab-description-text a {
    color: var(--primary, #d4af37);
    text-decoration: underline;
    text-decoration-color: rgba(212, 175, 55, 0.3);
    text-underline-offset: 2px;
}

.tab-description-text a:hover {
    text-decoration-color: var(--primary, #d4af37);
}

/* ── Collapsible Help Section ─────────────────────────────────────────── */

.tab-help {
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 0.75rem;
}

.tab-help summary {
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary, #d4af37);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    user-select: none;
    transition: color 0.15s ease;
}

.tab-help summary::-webkit-details-marker {
    display: none;
}

.tab-help summary::before {
    content: '▸';
    display: inline-block;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.tab-help[open] summary::before {
    transform: rotate(90deg);
}

.tab-help summary:hover {
    color: var(--text-light, #e8e8e8);
}

.tab-help-content {
    padding-top: 0.75rem;
}

.tab-help-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tab-help-list li {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-muted, #888);
    padding-left: 1rem;
    position: relative;
}

.tab-help-list li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--primary, #d4af37);
    font-weight: 700;
}

.tab-help-list li strong {
    color: var(--text-light, #e8e8e8);
    font-weight: 600;
}

/* ── Quick Actions Row (optional companion) ───────────────────────────── */

.tab-description-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.tab-description-actions .btn-sm {
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
    border-radius: 0.375rem;
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary, #d4af37);
    border: 1px solid rgba(212, 175, 55, 0.2);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.tab-description-actions .btn-sm:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.4);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Global Tooltip System
   Usage: <span data-tooltip="Help text here">?</span>
   ═══════════════════════════════════════════════════════════════════════════ */

.tooltip-container {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.tooltip-container.tooltip-visible {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-bubble {
    background: #1a1a1a;
    color: var(--text-light, #e8e8e8);
    font-size: 0.8rem;
    line-height: 1.45;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    max-width: 280px;
    word-wrap: break-word;
}

.tooltip-arrow {
    width: 8px;
    height: 8px;
    background: #1a1a1a;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    transform: rotate(45deg);
    position: absolute;
    bottom: -5px;
    left: 50%;
    margin-left: -4px;
}

/* Arrow when tooltip is below the element */
.tooltip-container.tooltip-below .tooltip-arrow {
    top: -5px;
    bottom: auto;
    transform: rotate(-135deg);
}

/* Inline tooltip trigger styling (optional helper) */
[data-tooltip] {
    cursor: help;
    position: relative;
}

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted, #888);
    font-size: 0.65rem;
    font-weight: 700;
    cursor: help;
    vertical-align: middle;
    margin-left: 0.25rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.tooltip-icon:hover {
    background: rgba(212, 175, 55, 0.15);
    color: var(--primary, #d4af37);
    border-color: rgba(212, 175, 55, 0.3);
}

/* ── Mobile Responsive ────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .tab-description {
        padding: 1rem 1rem;
        margin-bottom: 1rem;
    }

    .tab-description-title {
        font-size: 1rem;
    }

    .tab-description-text {
        font-size: 0.85rem;
    }

    .tab-help summary {
        font-size: 0.8rem;
    }

    .tab-help-list li {
        font-size: 0.8rem;
    }

    .tab-description-actions {
        flex-direction: column;
    }

    .tab-description-actions .btn-sm {
        text-align: center;
    }

    .tooltip-bubble {
        max-width: 220px;
        font-size: 0.78rem;
    }
}
