/* =========================
   OVERLAY
========================= */

.popup-overlay {

    position: fixed;

    inset: 0;

    z-index: 5000;

    display: flex;

    align-items: center;
    justify-content: center;

    opacity: 0;

    pointer-events: none;

    transition:
        opacity 0.35s ease;
}

/* active */

.popup-overlay.active {

    opacity: 1;

    pointer-events: auto;
}

/* =========================
   BACKDROP
========================= */

.popup-backdrop {

    position: absolute;

    inset: 0;

    /*
        start transparent
    */

    background:
        rgba(10, 15, 30, 0);

    /*
        constant blur
    */

    backdrop-filter:
        blur(0px);

    -webkit-backdrop-filter:
        blur(0px);

    transition:
        background 0.45s ease,
        backdrop-filter 0.45s ease,
        -webkit-backdrop-filter 0.45s ease;
}

/* active backdrop */

.popup-overlay.active .popup-backdrop {

    background:
        rgba(10, 15, 30, 0.35);

    backdrop-filter:
        blur(12px);

    -webkit-backdrop-filter:
        blur(12px);
}

/* =========================
   POPUP
========================= */

.popup-container {

    position: relative;

    width:
        min(1300px, 92vw);

    max-height:
        90vh;

    padding: 35px;

    overflow-y: auto;

    border-radius: 28px;

    background:
        rgba(255, 255, 255, 0.92);

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.25);

    /*
        initial state
    */

    opacity: 0;

    transform:
        translateY(40px) scale(0.96);

    transition:
        opacity 0.35s ease,
        transform 0.45s cubic-bezier(.22, 1, .36, 1);
}

/* active */

.popup-overlay.active .popup-container {

    opacity: 1;

    transform:
        translateY(0) scale(1);
}

/* ===== RESPONSIVE POPUP ===== */
@media (max-width: 768px) {
    .popup-container {
        width: 96vw;
        padding: 24px 18px;
        max-height: 95vh;
        border-radius: 20px;
    }
}

@media (max-width: 480px) {
    .popup-container {
        width: 100vw;
        padding: 18px 14px;
        border-radius: 16px 16px 0 0;
        max-height: 92vh;
        margin-top: auto;
        transform: translateY(40px);
    }
    .popup-overlay {
        align-items: flex-end;
    }
    .popup-overlay.active .popup-container {
        transform: translateY(0);
    }
}

/* =========================
   LOADING SPINNER
========================= */

.popup-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #E2E8F0;
    border-top-color: #2563EB;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =========================
   FAVOURITES POPUP
========================= */

.fav-list {
    margin-top: 20px;
}

.fav-item {
    cursor: pointer;
    border: 1px solid #e8ecf4;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    gap: 16px;
    transition: background 0.2s;
}

.fav-item:hover {
    background: rgba(23, 85, 186, 0.03);
}

.fav-thumb {
    width: 100px;
    height: 75px;
    border-radius: 8px;
    overflow: hidden;
    background: #e8ecf4;
    flex-shrink: 0;
}

.fav-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fav-thumb-placeholder {
    padding: 24px;
    text-align: center;
    color: #999;
}

.fav-body {
    flex: 1;
}

.fav-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.fav-location {
    font-size: 13px;
    color: var(--text-secondary);
}

.fav-location i {
    color: var(--accent);
}

.fav-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.fav-popup-title {
    font-size: 22px;
    font-weight: 700;
}

.fav-empty {
    text-align: center;
    color: var(--text-muted);
}

.fav-empty-container {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
}

/* =========================
   EMPTY STATE
========================= */

.empty-state-centered {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.empty-state-centered .empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.empty-state-centered .empty-title {
    font-size: 16px;
    font-weight: 600;
}

.empty-state-centered .empty-desc {
    font-size: 13px;
    margin-top: 4px;
}

/* =========================
   ACTIVITY CARD (for favourites list)
========================= */

.activity-card-fav {
    cursor: pointer;
    border: 1px solid #e8ecf4;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    gap: 16px;
    transition: background 0.2s;
}

.activity-card-fav:hover {
    background: rgba(23, 85, 186, 0.03);
}

.activity-card-fav .card-thumb {
    width: 120px;
    height: 90px;
    border-radius: 10px;
    overflow: hidden;
    background: #e8ecf4;
    flex-shrink: 0;
}

.activity-card-fav .card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.activity-card-fav .card-thumb-placeholder {
    padding: 30px;
    text-align: center;
    color: #999;
}

.activity-card-fav .card-body {
    flex: 1;
}

.activity-card-fav .card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.activity-card-fav .card-type-badge {
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #dce9ff;
    color: var(--accent);
    font-weight: 600;
}

.activity-card-fav .card-date {
    font-size: 12px;
    color: var(--text-muted);
}

.activity-card-fav .card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.activity-card-fav .card-location {
    font-size: 13px;
    color: var(--text-secondary);
}

.activity-card-fav .card-location i {
    color: var(--accent);
}