/*
 * EON Trip Galleries – Frontend Styles
 * Formulario de contraseña + galería con tabs + lightbox
 */

/* ── Reset base ──────────────────────────────────────────────────────────── */
.eon-gallery-wrap *,
.eon-password-wrap * {
    box-sizing: border-box;
}

/* ── Scroll lock (cuando el lightbox está abierto) ───────────────────────── */
body.eon-no-scroll {
    overflow: hidden;
}

/* ════════════════════════════════════════════════════════════════════════════
   FORMULARIO DE CONTRASEÑA
   ════════════════════════════════════════════════════════════════════════════ */

.eon-password-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 24px;
    max-width: 480px;
    margin: 0 auto;
}

/* Ícono candado */
.eon-lock-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: #fff;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.eon-lock-icon svg {
    width: 34px;
    height: 34px;
}

/* Info */
.eon-pw-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: #1a1a2e;
    line-height: 1.2;
}

.eon-pw-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 0 0 16px;
}

.eon-pw-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f0f4ff;
    color: #4361ee;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #d6e0ff;
}

.eon-pw-desc {
    color: #555;
    font-size: 15px;
    margin: 0 0 28px;
    line-height: 1.6;
}

/* Formulario */
.eon-pw-form {
    width: 100%;
}

.eon-pw-error {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: left;
}

.eon-pw-input-wrap {
    display: flex;
    gap: 8px;
}

.eon-pw-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    color: #1a1a2e;
    background: #fff;
}

.eon-pw-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.eon-pw-input--error {
    border-color: #dc2626;
}

.eon-pw-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.15s;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
}

.eon-pw-submit:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.eon-pw-submit:active {
    transform: translateY(0);
}

/* ════════════════════════════════════════════════════════════════════════════
   GALERÍA
   ════════════════════════════════════════════════════════════════════════════ */

.eon-gallery-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 40px;
    position: relative;
    z-index: 10;
    isolation: isolate;
}

.single-viaje .elementor-element.elementor-element-3a8af59 {
    z-index: 0 !important;
    pointer-events: none;
}

/* ── Encabezado ──────────────────────────────────────────────────────────── */
.eon-gallery-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e8e8e8;
}

.eon-gallery-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: #1a1a2e;
    line-height: 1.2;
}

.eon-gallery-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.eon-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f0f4ff;
    color: #4361ee;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #d6e0ff;
}

/* Botón salir */
.eon-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    color: #888;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.eon-logout-btn:hover {
    color: #dc2626;
    border-color: #fca5a5;
    background: #fef2f2;
}

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.eon-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.eon-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: #f4f4f8;
    color: #555;
    border: 2px solid transparent;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.eon-tab:hover {
    background: #eef0ff;
    color: #4361ee;
}

.eon-tab--active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.eon-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 11px;
    font-size: 12px;
    font-weight: 700;
}

.eon-tab:not(.eon-tab--active) .eon-tab-count {
    background: rgba(0, 0, 0, 0.08);
    color: #333;
}

/* ── Paneles ─────────────────────────────────────────────────────────────── */
.eon-panel {
    display: none;
}

.eon-panel--active {
    display: block;
    animation: eonFadeIn 0.25s ease;
}

.eon-day-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
}

.eon-day-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
}

.eon-day-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #d2dcff;
    background: #edf2ff;
    color: #2f54eb !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.eon-day-download svg {
    width: 14px;
    height: 14px;
    min-width: 14px;
    min-height: 14px;
    stroke: currentColor;
    fill: none;
}

.eon-day-download:hover,
.eon-day-download:focus-visible {
    background: #2f54eb;
    border-color: #2f54eb;
    color: #fff !important;
}

@keyframes eonFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Grilla de imágenes ──────────────────────────────────────────────────── */
.eon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.eon-grid-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #f0f0f0;
}

.eon-gallery-wrap .eon-grid-item > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.eon-grid-item:hover img {
    transform: scale(1.06);
}

.eon-grid-download {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    min-width: 34px;
    max-width: 34px;
    min-height: 34px;
    max-height: 34px;
    padding: 0 !important;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(18, 25, 38, 0.7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: 0;
    font-size: 0;
    z-index: 5;
    color: #fff !important;
    opacity: 1;
    transform: none;
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.eon-grid-download svg {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
}

.eon-grid-download:hover {
    background: rgba(37, 99, 235, 0.9);
    color: #fff !important;
}

.eon-grid-overlay {
    position: absolute;
    inset: 0;
    background: rgba(102, 126, 234, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s;
}

.eon-grid-item:hover .eon-grid-overlay {
    background: rgba(102, 126, 234, 0.5);
    opacity: 1;
}

/* ── Vacío ───────────────────────────────────────────────────────────────── */
.eon-empty {
    text-align: center;
    color: #888;
    font-size: 15px;
    padding: 40px 0;
}

/* ════════════════════════════════════════════════════════════════════════════
   LIGHTBOX
   ════════════════════════════════════════════════════════════════════════════ */

.eon-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.eon-lightbox--open {
    opacity: 1;
    pointer-events: all;
}

.eon-lb-img-wrap {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#eon-lb-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: opacity 0.25s;
    display: block;
}

#eon-lb-img.eon-lb-loading {
    opacity: 0.3;
}

/* Cerrar */
.eon-lb-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}

.eon-lb-download {
    position: absolute;
    top: 16px;
    right: 72px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    color: #fff !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.2s;
    z-index: 10;
}

.eon-lb-close,
.eon-lb-nav,
.eon-lb-download {
    box-sizing: border-box;
    min-width: 0 !important;
    padding: 0 !important;
    line-height: 0;
    font-size: 0;
}

.eon-lightbox button svg,
.eon-lightbox a svg {
    display: block;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px;
    min-height: 22px;
    flex: 0 0 22px;
}

.eon-lb-close svg,
.eon-lb-nav svg {
    fill: currentColor;
    stroke: none;
}

.eon-lb-download svg {
    fill: none;
    stroke: currentColor;
}

.eon-lb-nav svg {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px;
    min-height: 24px;
    flex-basis: 24px;
}

.eon-lb-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.eon-lb-download:hover {
    background: rgba(37, 99, 235, 0.9);
}

.eon-lb-close:hover,
.eon-lb-nav:hover,
.eon-lb-download:hover,
.eon-lb-close:focus-visible,
.eon-lb-nav:focus-visible,
.eon-lb-download:focus-visible {
    color: #fff !important;
}

/* Navegación */
.eon-lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 10;
}

.eon-lb-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.eon-lb-prev {
    left: 20px;
}

.eon-lb-next {
    right: 20px;
}

/* Contador */
.eon-lb-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 14px;
    border-radius: 20px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .eon-pw-input-wrap {
        flex-direction: column;
    }

    .eon-pw-submit {
        justify-content: center;
    }

    .eon-gallery-title {
        font-size: 1.3rem;
    }

    .eon-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 6px;
    }

    .eon-day-toolbar {
        flex-wrap: wrap;
    }

    .eon-day-download {
        padding: 7px 12px;
        font-size: 12px;
    }

    .eon-grid-download {
        opacity: 1;
        transform: none;
        width: 30px;
        height: 30px;
        top: 6px;
        right: 6px;
    }

    .eon-grid-download svg {
        width: 14px;
        height: 14px;
        min-width: 14px;
        min-height: 14px;
    }

    .eon-lb-prev {
        left: 8px;
    }

    .eon-lb-next {
        right: 8px;
    }

    .eon-lb-nav {
        width: 40px;
        height: 40px;
    }

    .eon-lb-download {
        width: 40px;
        height: 40px;
        right: 56px;
    }
}
