/* ============================================================
   MSV Swim Locker — My Recognition Module
   ============================================================ */

.msv-recognition-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* ── Book shell ─────────────────────────────────────────────── */

.msv-book {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Dot row */
.msv-book-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 10px 0 8px;
    flex-shrink: 0;
}

.msv-book-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s;
}

.msv-book-dot.active {
    width: 18px;
    border-radius: 3px;
    background: rgba(255,255,255,0.8);
}

/* Pages track */
.msv-book-pages-outer {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.msv-book-pages-track {
    display: flex;
    height: 100%;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Individual page */
.msv-book-page {
    min-width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 16px 16px 8px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

/* Page header */
.msv-page-eyebrow {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.5;
    margin-bottom: 3px;
}

.msv-page-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 3px;
}

.msv-page-count {
    font-size: 12px;
    opacity: 0.5;
    margin-bottom: 14px;
}

/* ── Badge grid ──────────────────────────────────────────────── */

.msv-badge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.msv-badge-card {
    perspective: 800px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    aspect-ratio: 1;
    position: relative;
}

.msv-badge-card--unread::after {
    content: '';
    position: absolute;
    top: 7px;
    right: 7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--msv-accent-500, #3b82f6);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.3);
    z-index: 10;
}

.msv-badge-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}

.msv-badge-card--flipped .msv-badge-card-inner {
    transform: rotateY(180deg);
}

.msv-badge-card-front,
.msv-badge-card-back {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 10px 8px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    box-sizing: border-box;
}

.msv-badge-card-back {
    transform: rotateY(180deg);
    justify-content: flex-start;
    padding: 10px;
    gap: 4px;
}

.msv-badge-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.msv-badge-card-name {
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    opacity: 0.9;
}

.msv-badge-card-from {
    font-size: 9px;
    opacity: 0.5;
    text-align: center;
}

.msv-badge-flip-hint {
    font-size: 11px;
    opacity: 0.25;
    margin-top: 2px;
}

.msv-badge-back-category {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.5;
    width: 100%;
}

.msv-badge-back-desc {
    font-size: 10px;
    line-height: 1.4;
    opacity: 0.75;
    width: 100%;
}

.msv-badge-back-note {
    font-size: 10px;
    line-height: 1.4;
    font-style: italic;
    opacity: 0.7;
    width: 100%;
    border-left: 2px solid var(--msv-accent-500, #3b82f6);
    padding-left: 6px;
    margin-top: 2px;
}

.msv-badge-back-date {
    font-size: 9px;
    opacity: 0.4;
    width: 100%;
    margin-top: auto;
}

/* ── Placeholder pages ───────────────────────────────────────── */

.msv-book-page--placeholder,
.msv-book-page--wrapped {
    display: flex;
    align-items: center;
    justify-content: center;
}

.msv-placeholder-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 0 24px;
    opacity: 0.6;
}

.msv-placeholder-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
}

.msv-placeholder-label {
    font-size: 17px;
    font-weight: 600;
    opacity: 0.8;
}

.msv-placeholder-sub {
    font-size: 13px;
    line-height: 1.5;
    opacity: 0.6;
    max-width: 220px;
}

/* ── Season Wrapped page ─────────────────────────────────────── */

.msv-wrapped-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 0 16px;
    width: 100%;
}

.msv-wrapped-lock {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    margin-bottom: 4px;
}

.msv-wrapped-title {
    font-size: 18px;
    font-weight: 700;
}

.msv-wrapped-sub {
    font-size: 13px;
    opacity: 0.55;
    line-height: 1.5;
    max-width: 240px;
    margin-bottom: 8px;
}

.msv-wrapped-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 280px;
}

.msv-wrapped-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 9px 12px;
    text-align: left;
    font-size: 13px;
}

.msv-wrapped-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
    opacity: 0.5;
}

.msv-wrapped-check--done {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
    opacity: 1;
    font-size: 13px;
}

/* ── Bottom nav ──────────────────────────────────────────────── */

.msv-book-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px 14px;
    flex-shrink: 0;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.msv-book-prev,
.msv-book-next {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    padding: 0;
}

.msv-book-prev:disabled,
.msv-book-next:disabled {
    opacity: 0.25;
    cursor: default;
}

.msv-book-prev:not(:disabled):active,
.msv-book-next:not(:disabled):active {
    background: rgba(255,255,255,0.2);
}

.msv-book-nav-label {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.7;
}

/* ── Loading / empty states ──────────────────────────────────── */

.msv-page-loading,
.msv-page-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 32px 0;
    font-size: 13px;
    opacity: 0.5;
}

/* ── Badge detail modal ──────────────────────────────────────── */

.msv-badge-detail-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 24px;
    box-sizing: border-box;
}

.msv-badge-detail-overlay[hidden] {
    display: none;
}

.msv-badge-detail-modal {
    background: var(--msv-surface-base, #1a1a2e);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    padding: 24px 20px 20px;
    width: 100%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    text-align: center;
}

.msv-badge-detail-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: rgba(255,255,255,0.7);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.msv-badge-detail-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 4px;
}

.msv-badge-detail-name {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
}

.msv-badge-detail-category {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.5;
}

.msv-badge-detail-meta {
    font-size: 12px;
    opacity: 0.55;
    margin-top: 2px;
}

.msv-badge-detail-note {
    background: rgba(255,255,255,0.07);
    border-left: 3px solid var(--msv-accent-500, #3b82f6);
    border-radius: 0 8px 8px 0;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    margin-top: 4px;
    font-style: italic;
    opacity: 0.85;
}

.msv-badge-detail-note[hidden] {
    display: none;
}
