/* ============================================================
   Welcome Mascot - Modal Styles
   Navigation modal overlay for internal pages
   ============================================================ */

/* ─── Modal Overlay ─── */
.mascot-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mascot-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ─── Modal Container ─── */
.mascot-modal {
    position: fixed;
    z-index: 10000;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-width: 480px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Center modal */
.mascot-modal {
    top: 50%;
    left: 50%;
    margin-left: -240px;
    margin-top: -42.5vh;
}

.mascot-modal.open {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

/* ─── Modal Header ─── */
.mascot-modal-header {
    display: flex;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 1;
    border-radius: 20px 20px 0 0;
}

.mascot-modal-header .modal-mascot-icon {
    width: 48px;
    height: 48px;
    margin-right: 14px;
    flex-shrink: 0;
}

.mascot-modal-header .modal-greeting {
    flex: 1;
    font-family: var(--mascot-font, 'Poppins', sans-serif);
}

.mascot-modal-header .modal-greeting h3 {
    margin: 0 0 2px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.mascot-modal-header .modal-greeting p {
    margin: 0;
    font-size: 13px;
    color: #888;
}

/* ─── Close Button ─── */
.mascot-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f5f5f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #666;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 12px;
}

.mascot-modal-close:hover {
    background: #e5e5e5;
    color: #333;
}

.mascot-modal-close:focus-visible {
    outline: 3px solid var(--mascot-primary, #4a90d9);
    outline-offset: 2px;
}

/* ─── Modal Body ─── */
.mascot-modal-body {
    padding: 16px 24px 24px;
}

/* ─── Navigation Grid ─── */
.modal-nav-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.modal-nav-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fafafa;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    font-family: var(--mascot-font, 'Poppins', sans-serif);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.modal-nav-item:hover {
    background: #f0f7ff;
    border-color: var(--mascot-primary, #4a90d9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.modal-nav-item .nav-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    flex-shrink: 0;
    opacity: 0.7;
}

.modal-nav-item.active {
    background: var(--mascot-primary, #4a90d9);
    color: white;
    border-color: transparent;
}

.modal-nav-item.active .nav-icon {
    opacity: 1;
    filter: brightness(5);
}

/* ─── Section Dividers ─── */
.modal-section-title {
    font-family: var(--mascot-font, 'Poppins', sans-serif);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin: 20px 0 10px;
    padding: 0;
}

/* ─── Recently Visited ─── */
.modal-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-recent-list li {
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.modal-recent-list li:hover {
    background: #f5f5f5;
}

.modal-recent-list li a {
    text-decoration: none;
    color: #555;
    font-family: var(--mascot-font, 'Poppins', sans-serif);
    font-size: 13px;
    display: flex;
    align-items: center;
}

.modal-recent-list li .recent-time {
    margin-left: auto;
    font-size: 11px;
    color: #bbb;
}

/* ─── Store Section in Modal ─── */
.modal-store-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.modal-store-card {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fffbf0;
    margin-bottom: 8px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.modal-store-card:hover {
    background: #fff5e0;
    border-color: #ffa500;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.15);
}

.modal-store-card .store-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
    flex-shrink: 0;
}

.modal-store-card .store-info {
    flex: 1;
}

.modal-store-card .store-info h4 {
    margin: 0 0 2px;
    font-size: 13px;
    font-weight: 600;
}

.modal-store-card .store-info p {
    margin: 0;
    font-size: 11px;
    color: #888;
}

.modal-store-card .store-dismiss {
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    cursor: pointer;
    color: #ccc;
    font-size: 16px;
    flex-shrink: 0;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-store-card .store-dismiss:hover {
    color: #999;
    background: rgba(0, 0, 0, 0.05);
}

/* ─── Responsive Modal ─── */
@media (max-width: 520px) {
    .mascot-modal {
        width: 95%;
        max-width: none;
        margin-left: 0;
        margin-top: 0;
        top: auto;
        left: 2.5%;
        bottom: 80px;
        border-radius: 20px;
        max-height: 75vh;
    }

    .modal-nav-grid {
        grid-template-columns: 1fr;
    }

    .mascot-modal-header {
        padding: 16px 18px 12px;
    }

    .mascot-modal-body {
        padding: 12px 18px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mascot-modal-overlay {
        transition-duration: 0.001ms;
    }

    .mascot-modal {
        transition-duration: 0.001ms;
    }
}
