@import "tailwindcss";
@source "../../";

@custom-variant dark (&:where(.dark, .dark *));

@theme {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.font-logo {
  font-family: "Outfit", sans-serif !important;
}

/* Custom styles */
html {
    scroll-behavior: smooth;
}
body {
    background-color: #f8fafc; /* slate-50 */
    overflow-x: hidden;
    color: #0f172a; /* slate-900 */
    transition: background-color 0.2s ease, color 0.2s ease;
}

html.dark body {
    background-color: #090d16; /* slate-950 enriquecido */
    color: #f8fafc;
}

/* Barra de desplazamiento personalizada y elegante */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9; 
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1; 
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

html.dark ::-webkit-scrollbar-track {
    background: #090d16;
}
html.dark ::-webkit-scrollbar-thumb {
    background: #334155;
}
html.dark ::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Paneles Flarum style */
.glass-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    scroll-margin-top: 80px; /* Evitar que el menú sticky superior tape el comentario seleccionado */
}

html.dark .glass-panel {
    background: #111827;
    border-color: #1f2937;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3);
}

.glass-panel-hover {
    transition: all 0.2s ease-in-out;
}

.glass-panel-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06);
    border-color: #cbd5e1;
}

html.dark .glass-panel-hover:hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -1px rgb(0 0 0 / 0.2);
    border-color: #374151;
}

/* Theme Toggle Icon Hover Animation */
.theme-icon-sun, .theme-icon-moon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}
.theme-toggle-btn:hover .theme-icon-sun {
    transform: rotate(45deg) scale(1.1);
}
.theme-toggle-btn:hover .theme-icon-moon {
    transform: rotate(-15deg) scale(1.1);
}

/* Cloudflare Turnstile Widget */
.cf-turnstile {
    min-height: 65px;
    border: 0 !important;
    outline: none !important;
    background: transparent !important;
}
.cf-turnstile iframe {
    border: 0 !important;
    outline: none !important;
    border-radius: 8px !important;
    background: transparent !important;
}

/* Estilos de Carrusel de Portafolio */
.carousel-viewport {
    position: relative;
    overflow: hidden;
    width: 100%;
    border-radius: 12px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.carousel-slide {
    min-width: 100%;
    box-sizing: border-box;
}

/* Solucionar cursor estático en botones e interactivos */
button, 
[onclick], 
a:not([href]) {
    cursor: pointer;
}

.bg-admin-green {
    background-color: #10b981 !important; /* Emerald 500 */
    color: #ffffff !important;
}

.bg-amber-600 {
    background-color: #d97706 !important; /* Golden Orange / Amber 600 */
    color: #ffffff !important;
}

.bg-amber-500 {
    background-color: #f59e0b !important; /* Amber 500 */
    color: #ffffff !important;
}

/* Botones selectores de búsqueda (Todo el contenido, Solo títulos, Ciudad, Portal) */
.srch-opt-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    background-color: #f8fafc;
    color: #64748b;
}

.srch-opt-btn[data-state="on"] {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.18) !important;
}

.srch-opt-btn[data-state="on"] svg {
    color: #ffffff !important;
}

.srch-opt-btn[data-state="off"] {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #64748b !important;
}

html.dark .srch-opt-btn[data-state="off"] {
    background-color: #0f172a !important;
    border-color: #1e293b !important;
    color: #94a3b8 !important;
}

.srch-opt-btn[data-state="off"] svg {
    color: #94a3b8 !important;
}

.srch-opt-btn[data-state="off"]:hover {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}

html.dark .srch-opt-btn[data-state="off"]:hover {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

.quote-box {
    border-left: 4px solid #818cf8;
    background-color: #eef2ff;
    color: #475569;
    font-style: italic;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    margin: 0.5rem 0;
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    font-size: 0.8rem;
    line-height: 1.4;
}

html.dark .quote-box {
    border-left: 4px solid #6366f1;
    background-color: rgba(99, 102, 241, 0.12);
    color: #cbd5e1;
}

.quote-box p {
    margin: 0 !important;
    padding: 0 !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

.clear-quote-btn {
    position: absolute;
    top: 1.25rem;
    right: 0.75rem;
    z-index: 20;
    cursor: pointer;
    background: transparent;
    border: none;
    color: #94a3b8;
    border-radius: 9999px;
    padding: 0.375rem;
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-quote-btn:hover {
    background-color: #ef4444 !important;
    color: #ffffff !important;
}

.deleted-discussion {
    background-color: #f1f5f9 !important; /* slate-100 */
}

html.dark .deleted-discussion {
    background-color: rgba(30, 41, 59, 0.7) !important;
}

.discussion-item {
    transition: background-color 0.15s ease;
}
.discussion-item:hover {
    background-color: rgba(241, 245, 249, 0.6);
}
html.dark .discussion-item:hover {
    background-color: rgba(30, 41, 59, 0.4);
}

/* Diferenciación visual de temas no leídos vs leídos */
.discussion-item.is-unread .discussion-title a {
    font-weight: 700 !important;
}
html.dark .discussion-item.is-unread .discussion-title a {
    color: #ffffff !important;
}

.discussion-item:not(.is-unread) .discussion-title a {
    font-weight: 400 !important;
    color: #64748b !important;
}
html.dark .discussion-item:not(.is-unread) .discussion-title a {
    color: #94a3b8 !important;
}

.discussion-item .discussion-title a:hover {
    color: #2563eb !important;
}
html.dark .discussion-item .discussion-title a:hover {
    color: #60a5fa !important;
}

.unread-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background-color: #2563eb;
    vertical-align: middle;
}
html.dark .unread-dot {
    background-color: #3b82f6 !important;
    box-shadow: none !important;
}

.discussion-item.is-unread .unread-phone-badge {
    font-weight: 700 !important;
}
html.dark .discussion-item.is-unread .unread-phone-badge {
    background-color: rgba(37, 99, 235, 0.25) !important;
    border-color: rgba(96, 165, 250, 0.5) !important;
    color: #93c5fd !important;
}
html.dark .discussion-item:not(.is-unread) .unread-phone-badge {
    background-color: rgba(30, 41, 59, 0.5) !important;
    border-color: rgba(51, 65, 85, 0.6) !important;
    color: #94a3b8 !important;
    font-weight: 400 !important;
}


.topic-page-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: bold;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 4px;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    transition: all 0.15s ease;
}
.topic-page-pill:hover {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}
html.dark .topic-page-pill {
    background: #1e293b;
    color: #94a3b8;
    border-color: #334155;
}
html.dark .topic-page-pill:hover {
    background: #3b82f6 !important;
    color: #ffffff !important;
    border-color: #3b82f6 !important;
}

.discussion-right-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.375rem;
    flex-shrink: 0;
    justify-content: center;
}

@media (min-width: 640px) {
    .discussion-right-block {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
}

.discussion-stats-grid {
    display: grid;
    grid-template-columns: min-content min-content;
    gap: 0.25rem 0.5rem;
    justify-content: end;
    align-items: center;
    flex-shrink: 0;
    width: 3.5rem; /* Ancho fijo para alinear las etiquetas a la izquierda */
}

.discussion-stats-grid span {
    justify-self: end;
    font-variant-numeric: tabular-nums;
}

/* Custom styles for Bans and Restrictions */
.banned-username {
    text-decoration: line-through !important;
    opacity: 0.65 !important;
    color: #64748b !important;
}

.ban-modal-backdrop {
    background-color: rgba(15, 23, 42, 0.65) !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ban-modal-backdrop.hidden {
    display: none !important;
}

.ban-modal-content {
    max-width: 480px !important;
    width: 90% !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 1rem !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}
html.dark .ban-modal-content {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

/* Retroalimentación Visual Táctil en Móviles */
button:active, 
a:active, 
.category-chip:active,
.glass-panel-hover:active {
    opacity: 0.7 !important;
}

/* Personalización de Quill Editor y visualización */
.ql-editor {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}
.comment-content-box.ql-editor {
    padding: 0 !important;
    min-height: auto !important;
    height: auto !important;
    overflow-y: visible !important;
    white-space: normal !important;
}
.comment-content-box a,
.ql-editor a,
.quill-content a {
    word-break: break-all !important;
}
/* Citas generales y publicadas (modo claro y oscuro) */
.ql-editor blockquote,
.comment-content-box blockquote,
.quill-content blockquote {
    border-left: 4px solid #818cf8 !important;
    background-color: #eef2ff !important;
    color: #475569 !important;
    font-style: italic !important;
    padding: 0.08rem 1rem !important;
    margin: 0 !important;
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
    border-radius: 0 !important;
}

html.dark .ql-editor blockquote,
html.dark .comment-content-box blockquote,
html.dark .quill-content blockquote,
html.dark #discussion-content blockquote {
    border-left-color: #6366f1 !important;
    background-color: rgba(30, 41, 59, 0.7) !important;
    color: #cbd5e1 !important;
}

html.dark .comment-content-box blockquote a.quote-link,
html.dark .comment-content-box blockquote strong,
html.dark .quill-content blockquote strong,
html.dark #discussion-content blockquote strong {
    color: inherit !important;
}

/* Resalte exclusivo para la caja de cita mientras se está respondiendo o editando en el editor */
html.dark #comment-editor-container .ql-editor blockquote,
html.dark #discussion-editor-container .ql-editor blockquote,
html.dark #edit-post-editor-container .ql-editor blockquote {
    border-left: 4px solid #6366f1 !important;
    background-color: rgba(99, 102, 241, 0.16) !important;
    color: #e2e8f0 !important;
    padding: 0.35rem 1rem !important;
}

html.dark #comment-editor-container .ql-editor blockquote a.quote-link,
html.dark #comment-editor-container .ql-editor blockquote strong,
html.dark #discussion-editor-container .ql-editor blockquote a.quote-link,
html.dark #discussion-editor-container .ql-editor blockquote strong,
html.dark #edit-post-editor-container .ql-editor blockquote a.quote-link,
html.dark #edit-post-editor-container .ql-editor blockquote strong {
    color: #a5b4fc !important;
}

.ql-editor blockquote {
    max-height: 140px !important;
    overflow-y: auto !important;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.ql-editor blockquote::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.ql-editor blockquote p,
.comment-content-box blockquote p,
.quill-content blockquote p {
    margin: 0 !important;
    padding: 0 !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

/* Primer bloque de cita en un grupo de citas consecutivas */
.ql-editor blockquote:not(blockquote + blockquote),
.comment-content-box blockquote:not(blockquote + blockquote),
.quill-content blockquote:not(blockquote + blockquote) {
    margin-top: 0.75rem !important;
    padding-top: 0.75rem !important;
    border-top-right-radius: 0.5rem !important;
}

/* Último bloque de cita en un grupo de citas consecutivas */
.ql-editor blockquote:not(:has(+ blockquote)),
.comment-content-box blockquote:not(:has(+ blockquote)),
.quill-content blockquote:not(:has(+ blockquote)) {
    margin-bottom: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    border-bottom-right-radius: 0.5rem !important;
}

/* Estilos para citas jerárquicas/anidadas reales (DOM nesting) */
.ql-editor blockquote .quote-wrapper,
.comment-content-box blockquote .quote-wrapper,
.quill-content blockquote .quote-wrapper {
    margin: 0.5rem 0 0.5rem 0.5rem !important;
    display: block !important;
}

.ql-editor .quote-wrapper blockquote,
.comment-content-box .quote-wrapper blockquote,
.quill-content .quote-wrapper blockquote {
    font-size: 0.75rem !important; 
    line-height: 1.25 !important;
    margin-bottom: 0 !important;
}

.ql-editor .quote-wrapper .quote-wrapper blockquote,
.comment-content-box .quote-wrapper .quote-wrapper blockquote,
.quill-content .quote-wrapper .quote-wrapper blockquote {
    font-size: 0.7rem !important;
    opacity: 0.85;
}

/* Reducir espacio de párrafos y saltos dentro de citas */
.ql-editor blockquote p,
.comment-content-box blockquote p,
.quill-content blockquote p {
    margin-bottom: 0.2rem !important;
    line-height: 1.25 !important;
}

/* Citas colapsables */
.quote-collapse-wrapper {
    position: relative;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.quote-collapse-wrapper blockquote {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    max-height: 96px;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    position: relative;
}

.quote-collapse-wrapper.expanded blockquote {
    max-height: none !important;
}

.quote-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.725rem;
    font-weight: 600;
    color: #4f46e5 !important;
    cursor: pointer;
    margin-top: 6px;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    padding: 3px 10px !important;
    border-radius: 6px !important;
    transition: all 0.2s;
    width: fit-content;
    user-select: none;
}

.quote-toggle-btn:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #4338ca !important;
}

html.dark .quote-toggle-btn {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #818cf8 !important;
}

html.dark .quote-toggle-btn:hover {
    background: #334155 !important;
    border-color: #475569 !important;
    color: #a5b4fc !important;
}

/* ============================================================
   Citas Ultra-Compactas para Mensajería Privada (Chat)
   ============================================================ */

/* Contenedor colapsable en chat */
.chat-quote-collapse-wrapper,
.msg-bubble-col .quote-collapse-wrapper {
    position: relative;
    margin-top: 0.25rem !important;
    margin-bottom: 0.25rem !important;
}

.chat-quote-collapse-wrapper blockquote,
.msg-bubble-col .quote-collapse-wrapper blockquote {
    max-height: 52px !important;
    overflow: hidden;
    transition: max-height 0.25s ease-in-out;
}

.chat-quote-collapse-wrapper.expanded blockquote,
.msg-bubble-col .quote-collapse-wrapper.expanded blockquote {
    max-height: none !important;
}

/* Espaciado general y tipografía de citas en burbujas de chat */
.msg-bubble-col .quill-content blockquote,
.quill-content.msg-mine blockquote,
.quill-content.msg-other blockquote {
    font-size: 0.75rem !important;
    line-height: 1.35 !important;
    padding: 0.15rem 0.6rem !important;
    margin: 0.25rem 0 !important;
    border-left-width: 3px !important;
    border-radius: 0 0.375rem 0.375rem 0 !important;
}

.msg-bubble-col .quill-content blockquote p,
.quill-content.msg-mine blockquote p,
.quill-content.msg-other blockquote p {
    margin-bottom: 0.1rem !important;
    line-height: 1.3 !important;
}

/* Citas anidadas en chat */
.msg-bubble-col .quill-content .quote-wrapper blockquote,
.quill-content.msg-mine .quote-wrapper blockquote,
.quill-content.msg-other .quote-wrapper blockquote {
    font-size: 0.7rem !important;
    line-height: 1.25 !important;
    padding: 0.1rem 0.45rem !important;
    margin: 0.15rem 0 0.15rem 0.25rem !important;
}

/* Botón de alternancia en chat */
.chat-quote-toggle-btn,
.msg-bubble-col .quote-toggle-btn {
    font-size: 0.68rem !important;
    padding: 2px 7px !important;
    border-radius: 5px !important;
    margin-top: 4px !important;
    gap: 3px !important;
}

/* Estilos de citas en burbujas PROPIAS (azul / .msg-mine) */
.quill-content.msg-mine blockquote {
    border-left-color: rgba(255, 255, 255, 0.85) !important;
    background-color: rgba(0, 0, 0, 0.16) !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

.quill-content.msg-mine blockquote strong,
.quill-content.msg-mine blockquote a.quote-link {
    color: #ffffff !important;
}

.quill-content.msg-mine .quote-toggle-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
}

.quill-content.msg-mine .quote-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.32) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #ffffff !important;
}

/* Estilos de citas en burbujas de OTROS (.msg-other) */
.quill-content.msg-other blockquote {
    border-left-color: #6366f1 !important;
    background-color: #eef2ff !important;
    color: #475569 !important;
}

html.dark .quill-content.msg-other blockquote {
    border-left-color: #818cf8 !important;
    background-color: rgba(15, 23, 42, 0.65) !important;
    color: #cbd5e1 !important;
}

html.dark .quill-content.msg-other blockquote strong {
    color: inherit !important;
}

/* Contención estricta contra desbordamiento de texto largo/sin espacios en burbujas */
#messages-container {
    overflow-x: hidden !important;
}

.msg-bubble-col {
    min-width: 0 !important;
    max-width: 100% !important;
}

.msg-bubble-col .quill-content,
.quill-content.msg-mine,
.quill-content.msg-other {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    word-wrap: break-word !important;
    hyphens: auto;
}

.msg-bubble-col .quill-content *,
.quill-content.msg-mine *,
.quill-content.msg-other * {
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    word-wrap: break-word !important;
}

.msg-bubble-col .quill-content pre,
.msg-bubble-col .quill-content code,
.quill-content.msg-mine pre,
.quill-content.msg-other pre,
.quill-content.msg-mine code,
.quill-content.msg-other code {
    white-space: pre-wrap !important;
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
}

.msg-bubble-col .quill-content img,
.quill-content.msg-mine img,
.quill-content.msg-other img {
    max-width: 200px !important;
    max-height: 180px !important;
    border-radius: 0.625rem !important;
    object-fit: cover !important;
    display: inline-block !important;
    margin: 4px 0 !important;
}

/* ── Multimedia en Mensajes Privados (Fotos y Videos) ── */
.chat-media-container {
    margin-top: 0.375rem;
    display: grid;
    gap: 4px;
    border-radius: 0.75rem;
    overflow: hidden;
    width: fit-content;
    max-width: 100%;
}

/* 1 solo archivo */
.chat-media-container.media-count-1 {
    grid-template-columns: 1fr;
    max-width: 200px;
}

.chat-media-container.media-count-1 .chat-media-item {
    width: 200px;
    height: 175px;
    max-width: 100%;
}

.chat-media-container.media-count-1.is-video-single {
    max-width: 220px;
}

.chat-media-container.media-count-1.is-video-single .chat-media-item {
    width: 220px;
    height: 130px;
    max-width: 100%;
}

/* 2 archivos */
.chat-media-container.media-count-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 230px;
}

.chat-media-container.media-count-2 .chat-media-item {
    width: 110px;
    height: 110px;
}

/* 3 o más archivos */
.chat-media-container.media-count-multi {
    grid-template-columns: repeat(3, 1fr);
    max-width: 260px;
}

.chat-media-container.media-count-multi .chat-media-item {
    width: 82px;
    height: 82px;
}

/* Elemento individual */
.chat-media-item {
    position: relative;
    border-radius: 0.625rem;
    overflow: hidden;
    background-color: #0f172a;
    cursor: pointer;
    border: none !important;
    outline: none !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    user-select: none;
    -webkit-user-select: none;
}

.chat-media-item img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    display: block !important;
    border: none !important;
    pointer-events: none !important;
    transition: transform 0.2s ease;
}

.chat-media-item:hover img {
    transform: scale(1.05);
}

.chat-media-item video {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    display: block !important;
    border: none !important;
    pointer-events: none !important;
}

.chat-media-video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: background 0.2s ease;
}

.chat-media-item:hover .chat-media-video-overlay {
    background: rgba(0, 0, 0, 0.12);
}

.chat-media-play-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease;
}

.chat-media-item:hover .chat-media-play-btn {
    transform: scale(1.1);
}

/* Animación premium de destello para comentarios citados */
.comment-highlight-flash {
    animation: highlight-target-flash 2s ease-out;
}

html.dark .comment-highlight-flash {
    animation: dark-highlight-target-flash 2s ease-out;
}

@keyframes highlight-target-flash {
    0% {
        background: #eef2ff;
        border-color: #818cf8;
        box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.3);
    }
    100% {
        background: #ffffff;
        border-color: #e2e8f0;
        box-shadow: none;
    }
}

@keyframes dark-highlight-target-flash {
    0% {
        background: rgba(49, 46, 129, 0.4);
        border-color: #818cf8;
        box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.2);
    }
    100% {
        background: rgba(15, 23, 42, 0.75);
        border-color: rgba(51, 65, 85, 0.5);
        box-shadow: none;
    }
}

.comment-content-box a.quote-link,
.ql-editor a.quote-link,
.comment-content-box a[href*="#comment-"],
.ql-editor a[href*="#comment-"] {
    color: inherit !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    font-weight: inherit !important;
    font-style: inherit !important;
    font-size: inherit !important;
}

.comment-content-box a.quote-link:hover,
.ql-editor a.quote-link:hover,
.comment-content-box a[href*="#comment-"]:hover,
.ql-editor a[href*="#comment-"]:hover {
    color: inherit !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    text-decoration: underline !important;
    opacity: 0.9;
}

/* Ocultar el pseudo-elemento ::after en la vista previa del editor porque ya tiene el SVG inline */
.comment-content-box a.quote-link::after,
.ql-editor a.quote-link::after {
    content: none !important;
    display: none !important;
}

/* Mostrar la flecha arriba en los mensajes publicados (donde el sanitizador quita la clase y el SVG) */
.comment-content-box a[href*="#comment-"]:not(.quote-link)::after,
.ql-editor a[href*="#comment-"]:not(.quote-link)::after {
    content: " ↑" !important;
    display: inline-block !important;
    background: none !important;
    width: auto !important;
    height: auto !important;
    margin-left: 2px !important;
    opacity: 0.8 !important;
    font-weight: bold !important;
    transform: none !important;
    transition: none !important;
}






.ql-editor ol, .comment-content-box ol {
    list-style-type: decimal !important;
    padding-left: 1.5rem !important;
    margin: 0.5rem 0 !important;
}
.ql-editor ul, .comment-content-box ul {
    list-style-type: disc !important;
    padding-left: 1.5rem !important;
    margin: 0.5rem 0 !important;
}
.ql-editor strong, .comment-content-box strong {
    font-weight: 700 !important;
}
.ql-editor em, .comment-content-box em {
    font-style: italic !important;
}
.ql-editor u, .comment-content-box u {
    text-decoration: underline !important;
}
.ql-editor s, .comment-content-box s {
    text-decoration: line-through !important;
}

/* Alturas de los editores Quill */
#discussion-editor-container,
#edit-post-editor-container {
    height: 280px !important;
}

/* Permitir que la caja de comentarios crezca de forma dinámica y fluida */
#comment-editor-container {
    height: auto !important;
    min-height: 140px !important;
    max-height: 400px !important;
}
#comment-editor-container .ql-editor {
    height: auto !important;
    min-height: 140px !important;
    max-height: 400px !important;
    overflow-y: auto !important;
}

/* Asegurar que el área interna de edición se ajuste al contenedor para editores fijos */
#discussion-editor-container.ql-container.ql-snow,
#edit-post-editor-container.ql-container.ql-snow {
    display: flex !important;
    flex-direction: column !important;
}
/* Tipografía y tamaño de texto en editores Quill */
.ql-container {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 0.9375rem; /* 15px en Desktop */
}

.ql-editor {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 0.9375rem;
    line-height: 1.55;
    padding: 12px 16px;
}

.ql-editor p,
.ql-editor span,
.ql-editor li {
    font-size: inherit;
    line-height: inherit;
}

.ql-editor.ql-blank::before {
    font-size: inherit;
    font-style: italic;
    color: #94a3b8;
}

html.dark .ql-editor.ql-blank::before {
    color: #64748b;
}

/* ── Ajuste de tamaño de texto de Quill en Móvil (<= 768px) ── */
@media (max-width: 768px) {
    .ql-container,
    .ql-container.ql-snow,
    .ql-editor,
    .ql-editor p,
    .ql-editor span,
    .ql-editor li,
    .ql-editor ol,
    .ql-editor ul,
    .msg-editor-wrap .ql-container,
    .msg-editor-wrap .ql-editor,
    .msg-editor-wrap .ql-editor p {
        font-size: 16px !important; /* Mismo tamaño óptimo de los campos de texto en móvil */
        line-height: 1.55 !important;
    }

    .ql-editor.ql-blank::before {
        font-size: 16px !important;
        line-height: 1.55 !important;
    }

    .ql-editor {
        padding: 10px 14px !important;
    }

    .ql-toolbar.ql-snow {
        padding: 6px 8px !important;
    }

    .ql-toolbar.ql-snow button {
        width: 28px !important;
        height: 28px !important;
        padding: 4px !important;
    }
}

/* Eliminar bordes internos de Quill y usar los del contenedor premium */
.ql-toolbar.ql-snow,
.ql-container.ql-snow {
    border: none !important;
}
.ql-toolbar.ql-snow {
    border-bottom: 1px solid #e2e8f0 !important; /* Borde separador sutil */
    background-color: #f8fafc !important; /* Fondo claro premium */
}

/* Links estilizados y estéticos dentro de publicaciones y comentarios */
.ql-editor a,
.comment-content-box a,
.quill-content.msg-other a {
    color: #4f46e5 !important; /* Indigo 600 */
    font-weight: 600;
    text-decoration: none !important;
    border-bottom: 2px solid rgba(79, 70, 229, 0.2);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0 4px;
    margin: 0 -2px;
    border-radius: 4px;
    background-color: rgba(79, 70, 229, 0.03);
}

.ql-editor a:hover,
.comment-content-box a:hover,
.quill-content.msg-other a:hover {
    color: #3730a3 !important; /* Indigo 800 */
    border-bottom-color: rgba(55, 48, 163, 0.8);
    background-color: rgba(79, 70, 229, 0.1);
    box-shadow: 0 1px 3px 0 rgba(79, 70, 229, 0.1);
}

/* Icono sutil de enlace externo */
.ql-editor a::after,
.comment-content-box a::after,
.quill-content.msg-other a::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='%234f46e5' class='w-3 h-3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.75;
    transition: opacity 0.2s ease, transform 0.2s ease;
    margin-left: 2px;
}

.ql-editor a:hover::after,
.comment-content-box a:hover::after,
.quill-content.msg-other a:hover::after {
    opacity: 1;
    transform: scale(1.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='%233730a3' class='w-3 h-3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244' /%3E%3C/svg%3E");
}

/* Links en burbujas propias (blancos sobre azul) */
.quill-content.msg-mine a {
    color: #fff !important;
    font-weight: 600;
    text-decoration: underline !important;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

.quill-content.msg-mine a:hover {
    opacity: 0.85;
}

.quill-content.msg-mine a::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='%23ffffff' class='w-3 h-3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.85;
    margin-left: 2px;
}

/* Quill Editor Clean Borders & Dark Mode Support */
.ql-toolbar.ql-snow {
    border: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-sizing: border-box;
}

.ql-container.ql-snow {
    border: none !important;
    box-sizing: border-box;
}

html.dark .ql-toolbar.ql-snow {
    background-color: #1e293b !important;
    border: none !important;
    border-bottom: 1px solid #334155 !important;
}

html.dark .ql-container.ql-snow {
    background-color: #0f172a !important;
    border: none !important;
    color: #f8fafc !important;
}

/* Botón de adjuntar fotos/videos en modo oscuro */
html.dark #photos-add-btn,
html.dark [id^="edit-comment-add-btn-"] {
    background-color: rgba(30, 41, 59, 0.6) !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

html.dark #photos-add-btn:hover,
html.dark [id^="edit-comment-add-btn-"]:hover {
    background-color: rgba(59, 130, 246, 0.15) !important;
    border-color: #3b82f6 !important;
    color: #60a5fa !important;
}

html.dark .ql-snow .ql-stroke {
    stroke: #94a3b8 !important;
}

html.dark .ql-snow .ql-fill {
    fill: #94a3b8 !important;
}

html.dark .ql-snow .ql-picker {
    color: #94a3b8 !important;
}

html.dark .ql-snow.ql-toolbar button:hover,
html.dark .ql-snow .ql-toolbar button:hover,
html.dark .ql-snow.ql-toolbar button.ql-active,
html.dark .ql-snow .ql-toolbar button.ql-active {
    background-color: #334155 !important;
    border-radius: 4px !important;
}

html.dark .ql-snow.ql-toolbar button:hover .ql-stroke,
html.dark .ql-snow .ql-toolbar button:hover .ql-stroke,
html.dark .ql-snow.ql-toolbar button.ql-active .ql-stroke,
html.dark .ql-snow .ql-toolbar button.ql-active .ql-stroke {
    stroke: #60a5fa !important;
}

html.dark .ql-snow.ql-toolbar button:hover .ql-fill,
html.dark .ql-snow .ql-toolbar button:hover .ql-fill,
html.dark .ql-snow.ql-toolbar button.ql-active .ql-fill,
html.dark .ql-snow .ql-toolbar button.ql-active .ql-fill {
    fill: #60a5fa !important;
}

html.dark .ql-snow .ql-picker-label:hover {
    color: #60a5fa !important;
}

html.dark .ql-snow .ql-picker.ql-expanded .ql-picker-label {
    color: #60a5fa !important;
    border-color: #334155 !important;
}

html.dark .ql-snow .ql-picker-options {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
    border-radius: 6px !important;
    padding: 6px 8px !important;
}

html.dark .ql-snow .ql-picker-item {
    color: #cbd5e1 !important;
}

html.dark .ql-snow .ql-picker-item:hover,
html.dark .ql-snow .ql-picker-item.ql-selected {
    color: #60a5fa !important;
}

html.dark .ql-snow .ql-tooltip {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #f1f5f9 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
}

html.dark .ql-snow .ql-tooltip input[type="text"] {
    background-color: #0f172a !important;
    border: 1px solid #334155 !important;
    color: #f8fafc !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
}

html.dark .ql-snow .ql-tooltip a.ql-action::after {
    color: #60a5fa !important;
    font-weight: 600 !important;
}

html.dark .ql-snow .ql-tooltip a.ql-remove::before {
    color: #f87171 !important;
    font-weight: 600 !important;
}

html.dark .ql-editor {
    color: #cbd5e1 !important;
    background-color: transparent !important;
}

html.dark .ql-editor p,
html.dark .ql-editor li {
    color: #cbd5e1;
}

html.dark .ql-editor strong,
html.dark .ql-editor b,
html.dark .comment-content-box strong,
html.dark .comment-content-box b {
    color: #ffffff !important;
    font-weight: 700 !important;
}

html.dark .ql-editor h1,
html.dark .ql-editor h2,
html.dark .ql-editor h3,
html.dark .ql-editor h4,
html.dark .ql-editor h5,
html.dark .ql-editor h6 {
    color: #ffffff !important;
    font-weight: 700;
}

html.dark .ql-editor.ql-blank::before {
    color: #64748b !important;
    font-style: normal !important;
}

/* ── Extractos compactos de comentarios en Perfil ── */
.profile-comment-snippet {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    line-height: 1.45 !important;
    margin: 0 !important;
}

.profile-quote-bar {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 0.375rem;
    background-color: #f1f5f9;
    border-left: 3px solid #818cf8;
    color: #64748b;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

html.dark .profile-quote-bar {
    background-color: rgba(30, 41, 59, 0.7);
    border-left-color: #6366f1;
    color: #94a3b8;
}

.profile-quote-bar .quote-label {
    font-weight: 700;
    color: #6366f1;
    flex-shrink: 0;
}

html.dark .profile-quote-bar .quote-label {
    color: #818cf8;
}

.profile-quote-bar .quote-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: italic;
}

/* Subtítulos de usuario (80% del tamaño del nombre) */
.author-subtitle-mobile {
    font-size: 12px !important;
    font-weight: 400 !important;
    font-style: italic;
    line-height: 1.25;
    word-break: break-word;
    display: block;
    margin-top: 2px;
    margin-bottom: 4px;
}

.author-subtitle-pc {
    font-size: 11px !important;
    font-weight: 400 !important;
    font-style: italic;
    line-height: 1.25;
    text-align: center;
    word-break: break-word;
}

/* Selector de Autor en Buscador Global (Sugerencias y Botón de Perfil) */
.sb-author-item {
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.sb-author-item:not(:last-child) {
    border-bottom: 1px solid #f1f5f9; /* Línea suave clara en modo claro */
}
.sb-author-item:hover {
    background-color: #f1f5f9; /* slate-100 */
}
html.dark .sb-author-item:not(:last-child) {
    border-bottom: 1px solid rgba(51, 65, 85, 0.6) !important; /* Línea oscura y discreta en dark mode, NUNCA blanca */
}
html.dark .sb-author-item:hover {
    background-color: rgba(51, 65, 85, 0.6) !important; /* slate-700/60 */
}

.sb-profile-badge {
    color: #2563eb;
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.sb-profile-badge:hover {
    background-color: #dbeafe;
    color: #1d4ed8;
    border-color: #93c5fd;
}
html.dark .sb-profile-badge {
    color: #60a5fa;
    background-color: rgba(30, 58, 138, 0.35);
    border-color: rgba(30, 64, 175, 0.5);
}
html.dark .sb-profile-badge:hover {
    background-color: rgba(30, 58, 138, 0.65);
    color: #93c5fd;
    border-color: rgba(96, 165, 250, 0.6);
}

/* ==========================================================================
   Estilos para Rol Anunciante y Sala Publicidad (Rosa Destacados SecretX #db2777)
   ========================================================================== */
.badge-anunciante {
    background-color: #fce7f3 !important; /* pink-100 */
    color: #9d174d !important; /* pink-800 */
    border: 1px solid #f472b6 !important; /* pink-400 */
    display: inline-flex !important;
    align-items: center;
}
html.dark .badge-anunciante {
    background-color: rgba(131, 24, 67, 0.45) !important; /* pink-950/45 */
    color: #f472b6 !important; /* pink-400 */
    border: 1px solid rgba(219, 39, 119, 0.65) !important; /* pink-600 */
}

/* Sala Publicidad y elementos temáticos en rosa */
.bg-pink-600 {
    background-color: #db2777 !important;
}
.text-pink-600 {
    color: #db2777 !important;
}
html.dark .text-pink-400 {
    color: #f472b6 !important;
}

