/* ==========================================================================
   Magazine PDF viewer (self-hosted, PDF.js) — Enjoy Elba 2026
   ========================================================================== */

.mv-wrap {
    max-width: 1100px;
    margin: 0 auto;
    font-family: inherit;
}

.mv-stage {
    position: relative;
    width: 100%;
    min-height: 420px;
    max-height: 82vh;
    background: #1b1b1b;
    border-radius: 6px;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .25);
}

.mv-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    background: #fff;
    box-shadow: 0 2px 14px rgba(0, 0, 0, .4);
}

/* Prev / next overlay arrows */
.mv-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 14%;
    min-width: 48px;
    border: 0;
    cursor: pointer;
    background: transparent;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    opacity: .55;
    transition: opacity .15s, background .15s;
    z-index: 3;
}
.mv-nav:hover { opacity: 1; background: rgba(0, 0, 0, .18); }
.mv-nav:disabled { opacity: .12; cursor: default; background: transparent; }
.mv-nav-prev { left: 0; }
.mv-nav-next { right: 0; }

/* Loading + error */
.mv-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #eee;
    gap: 14px;
    text-align: center;
    padding: 20px;
    z-index: 4;
}
.mv-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(255, 255, 255, .25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mv-spin 0.9s linear infinite;
}
@keyframes mv-spin { to { transform: rotate(360deg); } }
.mv-overlay a { color: #ffd24d; text-decoration: underline; }
.mv-hidden { display: none !important; }

/* Toolbar */
.mv-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.mv-btn {
    border: 0;
    background: #2c3e50;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    transition: background .15s;
}
.mv-btn:hover { background: #1f2d3a; }
.mv-btn:disabled { opacity: .4; cursor: default; }
.mv-pageinfo {
    color: #2c3e50;
    font-weight: 600;
    padding: 0 10px;
    min-width: 90px;
    text-align: center;
}
.mv-pageinfo input {
    width: 48px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 4px;
    font-size: 14px;
}

/* Fullscreen */
.mv-wrap:fullscreen,
.mv-wrap:-webkit-full-screen {
    background: #111;
    max-width: none;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.mv-wrap:fullscreen .mv-stage,
.mv-wrap:-webkit-full-screen .mv-stage {
    max-height: 90vh;
    flex: 1;
}

@media (max-width: 600px) {
    .mv-stage { max-height: 70vh; min-height: 300px; }
    .mv-btn { padding: 7px 9px; font-size: 13px; }
    .mv-nav { font-size: 26px; }
}

/* Link "Scarica il PDF": colore fisso anche in hover (evita il bianco globale) */
a.mv-download,
a.mv-download:visited {
    color: #FCA832 !important;
}
a.mv-download:hover,
a.mv-download:focus {
    color: #d98a1f !important;
    text-decoration: underline !important;
}

/* Pulsante "Acquista la rivista" -> shop Info-Elba */
a.mv-buy,
a.mv-buy:visited {
    display: inline-block;
    background: #FCA832;
    color: #fff !important;
    font-weight: 700;
    text-decoration: none !important;
    padding: 12px 28px;
    border-radius: 4px;
    letter-spacing: .5px;
    text-transform: uppercase;
    transition: background .2s ease;
}
a.mv-buy:hover,
a.mv-buy:focus {
    background: #d98a1f;
    color: #fff !important;
    text-decoration: none !important;
}
