/* ─────────────────────────────────────────────────────
   GestorFin — css_shortcode_crear_noticia.css
   ───────────────────────────────────────────────────── */

.gf-cn-wrap {
    max-width: 90%;
    margin: 0 auto;
    padding: 0 16px 40px;
    font-family: var(--gf-fuente-texto, 'Poppins', sans-serif);
    color: var(--gf-color-texto, #1e293b);
}

/* ── Header ────────────────────────────────────────── */
.gf-cn-header {
    padding: 28px 0 20px;
    border-bottom: 2px solid rgba(0,0,0,.06);
    margin-bottom: 28px;
}

.gf-cn-header h2 {
    font-family: var(--gf-fuente-encabezado, 'Poppins', sans-serif);
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gf-color-primario, #2563eb);
}

.gf-cn-header p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* ── Fila de media ─────────────────────────────────── */
.gf-cn-media-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.gf-cn-media-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border: 2px dashed rgba(0,0,0,.15);
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
    transition: all .2s;
    user-select: none;
}

.gf-cn-media-btn:hover {
    border-color: var(--gf-color-primario, #2563eb);
    color: var(--gf-color-primario, #2563eb);
    background: #eff6ff;
}

.gf-cn-media-btn.activo {
    border-color: var(--gf-color-primario, #2563eb);
    border-style: solid;
    background: #eff6ff;
    color: var(--gf-color-primario, #2563eb);
}

.gf-cn-media-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--gf-color-primario, #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

/* ── Preview imagen ────────────────────────────────── */
.gf-cn-imagen-preview {
    position: relative;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    max-height: 260px;
    background: #f1f5f9;
}

.gf-cn-imagen-preview img {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    display: block;
}

.gf-cn-quitar-imagen {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,.6);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}

.gf-cn-quitar-imagen:hover { background: rgba(220,38,38,.8); }

/* ── Campos ────────────────────────────────────────── */
.gf-cn-campo {
    margin-bottom: 16px;
}

.gf-cn-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.gf-cn-label i {
    color: var(--gf-color-primario, #2563eb);
}

.gf-cn-input-icon {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    transition: border-color .2s;
}

.gf-cn-input-icon:focus-within {
    border-color: var(--gf-color-primario, #2563eb);
    box-shadow: 0 0 0 3px rgba(37,99,235,.08);
}

.gf-cn-input-icon > i {
    padding: 0 14px;
    color: #94a3b8;
    font-size: 15px;
    flex-shrink: 0;
}

.gf-cn-input-icon input {
    flex: 1;
    border: none;
    outline: none;
    padding: 13px 12px 13px 0;
    font-size: 15px;
    color: #1e293b;
    background: transparent;
    font-family: var(--gf-fuente-texto, 'Poppins', sans-serif);
}

.gf-cn-input-icon input::placeholder { color: #cbd5e1; }

.gf-cn-cerrar-campo {
    padding: 0 14px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
    transition: color .2s;
}

.gf-cn-cerrar-campo:hover { color: #dc2626; }

/* ── Textarea abstract ─────────────────────────────── */
.gf-cn-campo textarea {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 13px 16px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    font-family: var(--gf-fuente-texto, 'Poppins', sans-serif);
    resize: vertical;
    transition: border-color .2s;
    box-sizing: border-box;
    line-height: 1.6;
}

.gf-cn-campo textarea:focus {
    border-color: var(--gf-color-primario, #2563eb);
    box-shadow: 0 0 0 3px rgba(37,99,235,.08);
    outline: none;
}

.gf-cn-campo textarea::placeholder { color: #cbd5e1; }

/* ── Quill editor ──────────────────────────────────── */
#gf-quill-editor {
    border: 1.5px solid #e2e8f0;
    border-radius: 0 0 10px 10px;
    min-height: 220px;
    font-size: 15px;
    font-family: var(--gf-fuente-texto, 'Poppins', sans-serif);
    background: #fff;
}

.ql-toolbar.ql-snow {
    border: 1.5px solid #e2e8f0 !important;
    border-bottom: none !important;
    border-radius: 10px 10px 0 0 !important;
    background: #f8fafc;
}

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

.ql-editor {
    min-height: 200px;
    padding: 16px !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
}

.ql-editor.ql-blank::before {
    color: #cbd5e1 !important;
    font-style: normal !important;
}

/* ── Footer ────────────────────────────────────────── */
.gf-cn-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 24px;
    margin-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.gf-cn-btn-guardar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 32px;
    background: var(--gf-color-primario, #2563eb);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--gf-fuente-especial, 'Poppins', sans-serif);
    transition: background .2s, transform .1s, box-shadow .2s;
    box-shadow: 0 4px 14px rgba(37,99,235,.3);
    border: 2px solid var(--gf-color-primario, #3C7DF0) !important;
border-radius: 50px !important;
color: var(--gf-color-primario, #3C7DF0) !important;
}

.gf-cn-btn-guardar:hover {
    background: var(--gf-color-primario, #3C7DF0) !important;
    color: #ffffff!important;
    box-shadow: 0 6px 20px rgba(37,99,235,.4);
    transform: translateY(-1px);
}

.gf-cn-btn-guardar:active { transform: translateY(0); }

/* ── Modal overlay ─────────────────────────────────── */
.gf-cn-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.55);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: gfFadeIn .2s ease;
}

@keyframes gfFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.gf-cn-modal {
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0,0,0,.18);
    animation: gfSlideUp .25s ease;
}

@keyframes gfSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.gf-cn-modal-icon {
    font-size: 48px;
    color: var(--gf-color-primario, #2563eb);
    margin-bottom: 16px;
    line-height: 1;
}

.gf-cn-modal-icon--exito {
    color: #16a34a;
}

.gf-cn-modal h3 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
    font-family: var(--gf-fuente-encabezado, 'Poppins', sans-serif);
}

.gf-cn-modal p {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 24px;
    line-height: 1.6;
}

.gf-cn-modal-acciones {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.gf-cn-btn-modal {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: all .2s;
    font-family: var(--gf-fuente-especial, 'Poppins', sans-serif);
    width: 100%;
}

.gf-cn-btn-modal span {
    font-size: 12px;
    font-weight: 400;
    opacity: .75;
}

.gf-cn-btn-draft {
    background: #fff;
    color: var(--gf-color-primario, #2563eb)!important;
    border-color: var(--gf-color-primario, #2563eb)!important;
    box-shadow: 0 4px 14px rgba(37,99,235,.3);
}

.gf-cn-btn-draft:hover {
    background: var(--gf-color-primario, #2563eb)!important;
    border-color: var(--gf-color-secundario, #1d4ed8)!important;
    color:#fff!important;
}

.gf-cn-btn-publish {
    background: #fff;
    color: var(--gf-color-primario, #2563eb)!important;
    border-color: var(--gf-color-primario, #2563eb)!important;
    box-shadow: 0 4px 14px rgba(37,99,235,.3);
}

.gf-cn-btn-publish:hover {
    background: var(--gf-color-primario, #2563eb)!important;
    border-color: var(--gf-color-secundario, #1d4ed8)!important;
    color:#fff!important;
}

.gf-cn-modal-cancelar {
    background: none;
    border-color: var(--gf-color-secundario, #1d4ed8)!important;
    color: var(--gf-color-secundario, #1d4ed8)!important;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border-radius: 6px;
    transition: color .2s;
}

.gf-cn-modal-cancelar:hover { background: var(--gf-color-primario, #2563eb)!important; color: #fff!important; }

/* ── Modal éxito ───────────────────────────────────── */
.gf-cn-modal-exito .gf-cn-modal-icon {
    font-size: 56px;
}

.gf-cn-btn-nueva {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--gf-fuente-especial, 'Poppins', sans-serif);
    transition: background .2s;
    margin-top: 8px;
}

.gf-cn-btn-nueva:hover { background: #15803d; }

/* ── Spinner ───────────────────────────────────────── */
.gf-cn-btn-guardar .fa-spinner { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 500px) {
    .gf-cn-modal { padding: 28px 20px; }
    .gf-cn-media-row { flex-direction: column; }
}
