/* =============================================
   SHOW.CSS — Detalle de incidencia
   ============================================= */

/* ── Página ──────────────────────────────────── */

.show-page {
    min-height: 100svh;
    background: var(--color-bg-subtle);
}

.show-wrapper {
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
}

/* ── Back link ───────────────────────────────── */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--color-text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 1.25rem;
    transition: color 0.15s ease;
}
.back-link:hover { color: var(--color-text); }

/* ── Cabecera: título sobre las imágenes ─────── */

.show-header-top {
    margin-bottom: 1rem;
}

.show-header-top .show-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.625rem;
    flex-wrap: wrap;
}

.show-header-top .show-title {
    margin-bottom: 0;
}

/* ── Layout: dos columnas en escritorio ──────── */

.show-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    grid-template-rows: auto;
    gap: 1.5rem;
    align-items: start;
}

.show-main   { min-width: 0; }
.show-sidebar { display: flex; flex-direction: column; gap: 1rem; }

@media (max-width: 768px) {
    .show-layout {
        grid-template-columns: 1fr;
    }
    /* En móvil el sidebar va DESPUÉS del contenido principal */
    .show-main    { order: 1; }
    .show-sidebar { order: 2; }
}

/* ── Tarjeta genérica ────────────────────────── */

.show-card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    padding: 1.25rem;
}

/* ── Cabecera: título + botón apoyo inline ──────── */

.show-title {
    font-size: clamp(1.625rem, 4vw, 2.25rem);
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.18;
    letter-spacing: -0.025em;
    margin-bottom: 0;
}

/* Fila título + botón apoyo */
.show-title-row {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
}
.show-title-row .show-title { flex: 1; min-width: 0; }

/* Formulario inline (no afecta layout) */
.show-inline-support-form { display: contents; }

/* Botón / indicador de apoyo */
.show-inline-support-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.375rem 0.75rem 0.375rem 0.5rem;
    border: 1.5px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-bg-subtle);
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
    margin-top: 0.4rem; /* alinear visualmente con baseline del título */
    white-space: nowrap;
}
.show-inline-support-btn:is(button):hover {
    border-color: #16a34a;
    color: #16a34a;
    background: #f0fdf4;
}
.show-inline-support-btn--done {
    border-color: #bbf7d0;
    color: #16a34a;
    background: #f0fdf4;
    cursor: default;
}
.show-inline-support-btn--owner {
    cursor: default;
}

/* ── Tarjeta de descripción (columna principal) ── */

.show-description-card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
}

.show-description {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
    line-height: 1.65;
    white-space: pre-wrap;
    margin: 0;
}
.show-description.is-empty {
    font-style: italic;
    color: var(--color-text-muted);
    opacity: 0.7;
}

/* ── Galería editorial (strip) ───────────────── */

.show-gallery-strip {
    position: relative;
    margin: 0 -1.25rem 1.5rem;
    background: #0f172a;
    overflow: hidden;
}

.show-gallery-scroll {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 2px;
}
.show-gallery-scroll::-webkit-scrollbar { display: none; }

/* Botón base — tamaño controlado por .show-gallery-item */
.show-image-btn {
    flex-shrink: 0;
    border: none;
    padding: 0;
    cursor: zoom-in;
    display: block;
    overflow: hidden;
    background: #0f172a;
}
.show-image-btn img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.show-image-btn:hover img { transform: scale(1.025); }

/* Item dentro del strip */
.show-gallery-item {
    width: 100%;
    height: 420px;
    scroll-snap-align: start;
}

/* Imagen única: un poco más alta */
.show-gallery-scroll--single .show-gallery-item {
    max-height: 500px;
    height: 460px;
}

/* Flechas de navegación — solo dispositivos con puntero fino (ratón) */
.show-gallery-arrow {
    display: none;
}

@media (pointer: fine) {
    .show-gallery-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2.5rem;
        height: 2.5rem;
        background: rgba(255, 255, 255, 0.9);
        border: none;
        border-radius: 50%;
        color: #1e293b;
        cursor: pointer;
        z-index: 10;
        transition: background 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    .show-gallery-arrow:hover {
        background: #ffffff;
        transform: translateY(-50%) scale(1.1);
    }
    .show-gallery-arrow[aria-disabled="true"] {
        opacity: 0.3;
        cursor: default;
        pointer-events: none;
    }
    .show-gallery-arrow--prev { left: 0.875rem; }
    .show-gallery-arrow--next { right: 0.875rem; }
}

/* Contador de fotos */
.show-gallery-counter {
    position: absolute;
    bottom: 0.75rem;
    right: 0.875rem;
    background: rgba(0, 0, 0, 0.55);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    pointer-events: none;
    backdrop-filter: blur(4px);
    letter-spacing: 0.02em;
}

@media (max-width: 640px) {
    .show-gallery-item,
    .show-gallery-scroll--single .show-gallery-item {
        height: 250px;
    }
}

/* ── Sidebar: tarjeta de metadatos ───────────── */

.show-meta-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.show-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
}

.show-meta-icon {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.375rem;
    background: rgba(37, 99, 235, 0.08);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.0625rem;
}

.show-meta-content {}

.show-meta-key {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    line-height: 1;
    margin-bottom: 0.2rem;
}

.show-meta-val {
    font-size: 0.875rem;
    color: var(--color-text);
    font-weight: 500;
    line-height: 1.3;
}

.show-meta-val a {
    color: var(--color-primary);
    text-decoration: none;
}
.show-meta-val a:hover { text-decoration: underline; }

/* ── Mapa en sidebar ─────────────────────────── */

.show-map-card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    overflow: hidden;
}

.show-map-container {
    width: 100%;
    height: 180px;
    position: relative;
}

#show-map {
    width: 100%;
    height: 100%;
}

.show-map-pin {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 2.5px solid #ffffff;
    box-shadow: 0 1px 6px rgba(37, 99, 235, 0.5);
}

.show-map-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    border-top: 1px solid var(--color-border);
    transition: background 0.12s ease;
}
.show-map-link:hover { background: rgba(37, 99, 235, 0.04); }

/* ── Support card ────────────────────────────── */

.show-support-card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    padding: 1.125rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.show-support-count {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1;
}
.show-support-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.2rem;
}

.support-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6875rem 1.125rem;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 0.625rem;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
    text-decoration: none;
}
.support-btn:hover { background: #fecaca; }
.support-btn--done {
    background: #f0fdf4;
    color: #16a34a;
    cursor: default;
}

/* ── Separador de sección ────────────────────── */

.show-section-sep {
    height: 1px;
    background: var(--color-border);
    margin: 0.5rem 0;
}

/* ── Comentarios ─────────────────────────────── */

.show-comments {
    margin-top: 1.5rem;
}

.show-comments-card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    padding: 1.375rem 1.5rem;
}

/* Reutilizamos los estilos de comentarios de profile.css */
.comments-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.comments-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.375rem;
    height: 1.375rem;
    padding: 0 0.375rem;
    background: var(--color-primary);
    color: #fff;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
}

/* ── Status badges ───────────────────────────── */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3125rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.status-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.status-badge--pending {
    background: #fef9c3;
    color: #854d0e;
}
.status-badge--pending .status-badge-dot { background: #ca8a04; }
.status-badge--resolved {
    background: #dcfce7;
    color: #166534;
}
.status-badge--resolved .status-badge-dot { background: #16a34a; }
.status-badge--progress {
    background: #dbeafe;
    color: #1e40af;
}
.status-badge--progress .status-badge-dot { background: #2563eb; }
.status-badge--rejected {
    background: #fee2e2;
    color: #991b1b;
}
.status-badge--rejected .status-badge-dot { background: #dc2626; }

/* ── Lightbox ────────────────────────────────── */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.lightbox.is-open { opacity: 1; }

.lightbox-img {
    max-width: min(90vw, 900px);
    max-height: 85svh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
}

.lightbox-close,
.lightbox-nav {
    position: fixed;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    backdrop-filter: blur(4px);
}
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.22); }

.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-nav--prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-nav--next { right: 1rem; top: 50%; transform: translateY(-50%); }

.lightbox-counter {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8125rem;
}

/* ── Toast ───────────────────────────────────── */

.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: #1e293b;
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(0.625rem);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 9000;
    pointer-events: none;
}
.toast.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.toast--error { background: #dc2626; }

/* ── Comentarios (reutilizado) ───────────────── */

.comment-form {
    margin-bottom: 1.5rem;
}
.comment-form-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.comment-form-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.comment-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), #7c3aed);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.comment-avatar--sm {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.625rem;
}
.comment-input {
    width: 100%;
    padding: 0.5625rem 0.875rem;
    border: 1.5px solid var(--color-border);
    border-radius: 0.625rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--color-text);
    background: var(--color-bg-subtle);
    resize: vertical;
    transition: border-color 0.15s ease;
    box-sizing: border-box;
}
.comment-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: #fff;
}
.comment-input--name { resize: none; }
.comment-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}
.comment-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5625rem 1.125rem;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 0.625rem;
    font-weight: 700;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: opacity 0.15s ease;
    font-family: inherit;
}
.comment-submit-btn:hover { opacity: 0.88; }
.comment-cancel-btn {
    padding: 0.5625rem 0.875rem;
    background: transparent;
    border: 1.5px solid var(--color-border);
    border-radius: 0.625rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s ease;
}
.comment-cancel-btn:hover { border-color: var(--color-text-muted); }

.comment {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--color-border);
}
.comment:last-child { border-bottom: none; }
.comment--reply { padding-left: 1rem; }

.comment-body { flex: 1; min-width: 0; }
.comment-meta {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}
.comment-author {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--color-text);
}
.comment-date {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}
.comment-text {
    font-size: 0.9375rem;
    color: var(--color-text);
    line-height: 1.55;
    margin-bottom: 0.375rem;
}
.comment-reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: none;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    transition: color 0.12s ease;
}
.comment-reply-btn:hover { color: var(--color-primary); }

.comment-replies {
    margin-top: 0.75rem;
    border-left: 2px solid var(--color-border);
    padding-left: 0.75rem;
    display: flex;
    flex-direction: column;
}
.comment-reply-form { margin-top: 0.625rem; }
.comments-empty {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9375rem;
    padding: 1.5rem 0 0.5rem;
}

/* ── Tarjeta de compartir ────────────────────── */

.show-share-card {
    padding: 1rem 1.25rem;
}

.show-card-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.share-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 1.5px solid var(--color-border);
    background: var(--color-bg-subtle);
    color: var(--color-text-muted);
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
    flex-shrink: 0;
}
.share-btn:hover { transform: scale(1.12); border-color: transparent; }

.share-btn--whatsapp:hover { background: #25D366; color: #fff; }
.share-btn--twitter:hover  { background: #000000; color: #fff; }
.share-btn--telegram:hover { background: #2CA5E0; color: #fff; }
.share-btn--facebook:hover { background: #1877F2; color: #fff; }
.share-btn--copy:hover     { background: var(--color-primary); color: #fff; }
.share-btn--copied         { background: #f0fdf4 !important; color: #16a34a !important;
                             border-color: #bbf7d0 !important; transform: none !important; font-size: 0.6875rem; }

