/* *********************************************************** */
/* Desarrollado por Herlin R. Espinosa G. (herlin25@gmail.com) */
/* *********************************************************** */
/*
 * webview-download.css
 * Estilos del visor embebido de imágenes para PWA / WebView.
 * Ver public/js/webview-download.js.
 */

.wvd-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.92);
    /* Respeta notch / barras del sistema en móvil */
    padding: env(safe-area-inset-top) env(safe-area-inset-right)
        env(safe-area-inset-bottom) env(safe-area-inset-left);
    -webkit-user-select: none;
    user-select: none;
}

.wvd-overlay[hidden] {
    display: none;
}

.wvd-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: #fff;
    flex: 0 0 auto;
}

.wvd-title {
    font-size: 0.95rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
}

.wvd-actions {
    display: flex;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.wvd-btn {
    appearance: none;
    border: 0;
    border-radius: 6px;
    padding: 0.5rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.wvd-btn:active {
    background: rgba(255, 255, 255, 0.3);
}

.wvd-btn--primary {
    background: #2b7de9;
}

.wvd-btn--primary:active {
    background: #2467bd;
}

.wvd-btn[hidden] {
    display: none;
}

.wvd-stage {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 0.5rem 1rem 1rem;
}

.wvd-stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* Permite guardar con pulsación larga en móvil */
    -webkit-user-select: auto;
    user-select: auto;
    -webkit-touch-callout: default;
}
