/**
 * /assets/css/character-discoveries.css
 *
 * Purpose:  Styling for character discovery notification banner + overlay
 * Deps:     app.css (variables)
 * Load:     index.php
 * Version:  1.0.0
 */

/* ============================================================
   Discovery Banner (clickable bar on character page)
   ============================================================ */

.disc-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    margin-bottom: 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(93, 214, 201, 0.25);
    border-left: 3px solid rgba(93, 214, 201, 0.6);
    background: rgba(93, 214, 201, 0.06);
    backdrop-filter: blur(8px) saturate(1.2);
    -webkit-backdrop-filter: blur(8px) saturate(1.2);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    animation: disc-banner-pulse 2.5s ease-in-out infinite;
}

.disc-banner:hover {
    border-color: rgba(93, 214, 201, 0.5);
    box-shadow: 0 0 16px rgba(93, 214, 201, 0.15);
    transform: translateY(-1px);
}

.disc-banner:active {
    transform: translateY(0);
}

@keyframes disc-banner-pulse {
    0%, 100% { box-shadow: 0 0 0 rgba(93, 214, 201, 0); }
    50% { box-shadow: 0 0 12px rgba(93, 214, 201, 0.1); }
}

.disc-banner__icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(93, 214, 201, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent, #5dd6c9);
    font-size: 1rem;
    animation: disc-icon-spin 4s linear infinite;
}

@keyframes disc-icon-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.disc-banner__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
}

.disc-banner__hint {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
}

.disc-banner__badge {
    flex-shrink: 0;
    min-width: 24px;
    height: 24px;
    border-radius: 12px;
    background: var(--accent, #5dd6c9);
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

/* ============================================================
   Discovery Overlay (full-screen overlay with discovery list)
   ============================================================ */

.disc-overlay {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.disc-overlay.disc-overlay--visible {
    opacity: 1;
    pointer-events: auto;
}

.disc-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.disc-overlay__panel {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    margin: 0 1rem 2rem;
    border-radius: 16px;
    background: rgba(30, 32, 40, 0.95);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    transform: translateY(40px);
    transition: transform 0.3s cubic-bezier(.4, 0, .2, 1);
    overflow: hidden;
}

.disc-overlay--visible .disc-overlay__panel {
    transform: translateY(0);
}

/* Header */
.disc-overlay__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.disc-overlay__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.disc-overlay__title i {
    color: var(--accent, #5dd6c9);
}

.disc-overlay__actions {
    display: flex;
    gap: 0.5rem;
}

/* Scrollable list */
.disc-overlay__list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

/* Individual discovery item */
.disc-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    transition: background 0.15s;
}

.disc-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.disc-item__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
}

/* Type-based icon colors */
.disc-item__icon--location { background: rgba(23, 162, 184, 0.15); color: #17a2b8; }
.disc-item__icon--monster  { background: rgba(220, 53, 69, 0.15);  color: #dc3545; }
.disc-item__icon--npc      { background: rgba(32, 201, 151, 0.15); color: #20c997; }
.disc-item__icon--faction  { background: rgba(255, 193, 7, 0.15);  color: #ffc107; }
.disc-item__icon--quest    { background: rgba(77, 163, 255, 0.15); color: #4da3ff; }
.disc-item__icon--map      { background: rgba(93, 214, 201, 0.15); color: #5dd6c9; }

.disc-item__body {
    flex: 1;
    min-width: 0;
}

.disc-item__label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.1rem;
}

.disc-item__label--location { color: #17a2b8; }
.disc-item__label--monster  { color: #dc3545; }
.disc-item__label--npc      { color: #20c997; }
.disc-item__label--faction  { color: #ffc107; }
.disc-item__label--quest    { color: #4da3ff; }
.disc-item__label--map      { color: #5dd6c9; }

.disc-item__name {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.disc-item__time {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 0.1rem;
}

.disc-item__dismiss {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    font-size: 0.7rem;
}

.disc-item__dismiss:hover {
    background: rgba(93, 214, 201, 0.12);
    color: var(--accent, #5dd6c9);
    border-color: rgba(93, 214, 201, 0.3);
}

/* Empty state */
.disc-overlay__empty {
    padding: 2.5rem 1.25rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.35);
}

.disc-overlay__empty i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.75rem;
    opacity: 0.4;
}

/* ============================================================
   Reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .disc-banner { animation: none; }
    .disc-banner__icon { animation: none; }
    .disc-overlay { transition: none; }
    .disc-overlay__panel { transition: none; }
}

/* ============================================================
   Mobile adjustments
   ============================================================ */

@media (max-width: 576px) {
    .disc-overlay__panel {
        margin: 0 0.5rem 1rem;
        max-height: 85vh;
    }

    .disc-banner {
        padding: 0.55rem 0.75rem;
        gap: 0.5rem;
    }

    .disc-banner__icon {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
}
