/* ==========================================================
   News Form — Complementa clean-theme.css para el formulario
   ========================================================== */

/* Ocultar notificacion de API de TinyMCE */
.tox-notifications-container,
.tox-notification,
.tox-notification--warning,
.tox-notification--in {
    display: none !important;
}

/* --- Campos del formulario --- */
.nf-field {
    margin-bottom: 1.25rem;
}

.nf-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--clean-text-primary, #111827);
    margin-bottom: 0.375rem;
}

.nf-required {
    color: var(--clean-danger, #dc2626);
}

.nf-hint {
    font-size: 0.75rem;
    color: var(--clean-text-muted, #6b7280);
    margin-top: 0.25rem;
    margin-bottom: 0;
}

.nf-error {
    font-size: 0.75rem;
    color: var(--clean-danger, #dc2626);
    margin-top: 0.25rem;
    margin-bottom: 0;
}

/* Selects y file inputs dentro del form */
.nf-field select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--clean-text-primary, #111827);
    background: var(--clean-bg-elevated, #ffffff);
    border: 1px solid var(--clean-border-default, #d1d5db);
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.nf-field select:focus {
    outline: none;
    border-color: var(--clean-primary, #1d4ed8);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

.nf-field input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.8125rem;
    color: var(--clean-text-secondary, #4b5563);
    background: var(--clean-bg-tertiary, #f3f4f6);
    border: 1px dashed var(--clean-border-default, #d1d5db);
    border-radius: 6px;
    cursor: pointer;
}

.nf-field input[type="file"]:hover {
    border-color: var(--clean-primary, #1d4ed8);
    background: var(--clean-bg-elevated, #ffffff);
}

/* --- Grid 2 columnas --- */
.nf-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 640px) {
    .nf-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* --- Checkboxes en fila --- */
.nf-checkbox-row {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nf-checkbox-row label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--clean-text-secondary, #4b5563);
    cursor: pointer;
    margin-bottom: 0;
}

/* --- Seccion colapsable (opciones de moderador) --- */
.nf-advanced {
    margin-top: 0.5rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--clean-border-light, #e5e7eb);
    border-radius: 8px;
    overflow: hidden;
}

.nf-advanced summary {
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--clean-text-secondary, #4b5563);
    background-color: var(--clean-bg-tertiary, #f3f4f6);
    cursor: pointer;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nf-advanced summary::before {
    content: '\25B6';
    font-size: 0.6rem;
    transition: transform 0.2s;
}

.nf-advanced[open] summary::before {
    transform: rotate(90deg);
}

.nf-advanced summary:hover {
    background-color: var(--clean-bg-hover, #f9fafb);
}

.nf-advanced summary::-webkit-details-marker {
    display: none;
}

.nf-advanced-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-top: 1px solid var(--clean-border-light, #e5e7eb);
}

/* --- Acciones del formulario --- */
.nf-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1.25rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--clean-border-light, #e5e7eb);
}

/* --- Alerta de errores --- */
.nf-alert-error {
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    font-size: 0.8125rem;
    color: #dc2626;
}

.nf-alert-error strong {
    display: block;
    margin-bottom: 0.375rem;
}

.nf-alert-error ul {
    margin: 0;
    padding-left: 1.25rem;
}

/* --- Contenedor responsive para embebidos de video --- */
.nf-embed-responsive {
    position: relative;
    width: 100%;
    max-width: 560px;
    aspect-ratio: 16 / 9;
    margin: 1.5rem auto;
}

.nf-embed-instagram {
    aspect-ratio: 4 / 5;
    max-width: 400px;
    margin: 1.5rem auto;
}

.nf-embed-tiktok {
    aspect-ratio: 9 / 16;
    max-width: 325px;
    margin: 1.5rem auto;
}

/* ==========================================================
   Drop-Zone — Imagen destacada
   ========================================================== */

/* Ocultar input nativo (sigue funcional para submit) */
.nf-dropzone__native {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
}

.nf-dropzone {
    position: relative;
    width: 100%;
    min-height: 10rem;
    border: 2px dashed var(--clean-border-default, #d1d5db);
    border-radius: 10px;
    background-color: var(--clean-bg-tertiary, #f9fafb);
    transition: border-color 0.2s, background-color 0.2s;
    cursor: pointer;
    overflow: hidden;
}

.nf-dropzone:hover,
.nf-dropzone:focus-visible {
    border-color: var(--clean-primary, #1d4ed8);
    background-color: #eef2ff;
    outline: none;
}

/* Estado vacio */
.nf-dropzone__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    text-align: center;
    min-height: 10rem;
}

.nf-dropzone__icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--clean-border-light, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    color: var(--clean-text-muted, #6b7280);
    font-size: 1.25rem;
    transition: background-color 0.2s, color 0.2s;
}

.nf-dropzone:hover .nf-dropzone__icon {
    background: #dbeafe;
    color: var(--clean-primary, #1d4ed8);
}

.nf-dropzone__text {
    font-size: 0.875rem;
    color: var(--clean-text-secondary, #4b5563);
    margin: 0 0 0.25rem;
}

.nf-dropzone__browse {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--clean-primary, #1d4ed8);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.nf-dropzone__hint {
    font-size: 0.75rem;
    color: var(--clean-text-muted, #6b7280);
    margin: 0;
}

.nf-dropzone__hint kbd {
    display: inline-block;
    padding: 0.1em 0.3em;
    font-size: 0.6875rem;
    font-weight: 600;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    box-shadow: 0 1px 0 #d1d5db;
}

/* Preview */
.nf-dropzone__preview {
    position: relative;
    width: 100%;
    min-height: 10rem;
    max-height: 20rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.nf-dropzone__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 10rem;
    max-height: 20rem;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.nf-dropzone__preview:hover .nf-dropzone__img {
    opacity: 0.5;
}

.nf-dropzone__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.nf-dropzone__preview:hover .nf-dropzone__overlay {
    opacity: 1;
}

.nf-dropzone__btn-change,
.nf-dropzone__btn-remove {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

.nf-dropzone__btn-change {
    background: rgba(255,255,255,0.9);
    color: #111827;
}

.nf-dropzone__btn-remove {
    background: rgba(220,38,38,0.9);
    color: #fff;
}

.nf-dropzone__meta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.35rem 0.75rem;
    background: rgba(0,0,0,0.5);
    color: rgba(255,255,255,0.9);
    font-size: 0.6875rem;
    text-align: right;
}

/* Drag-over overlay */
.nf-dropzone__dragover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(238,242,255,0.92);
    color: var(--clean-primary, #1d4ed8);
    font-size: 0.875rem;
    font-weight: 700;
    z-index: 10;
}

.nf-dropzone__dragover i {
    font-size: 2rem;
}

/* Error state */
.nf-dropzone--error {
    border-color: var(--clean-danger, #dc2626);
}

/* Mobile: overlay siempre visible (no hay hover) */
@media (max-width: 640px) {
    .nf-dropzone__overlay { opacity: 1; background: rgba(0,0,0,0.2); }
    .nf-dropzone__preview:hover .nf-dropzone__img { opacity: 0.85; }
}

/* ==========================================================
   Embebidos
   ========================================================== */

.nf-embed-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
}
