/* ─────────────────────────────────────────────────────
   GestorFin — css_shortcode_crear_tip.css
   ───────────────────────────────────────────────────── */

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

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

.gf-ct-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-ct-header p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

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

.gf-ct-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-ct-media-btn:hover {
    border-color: var(--gf-color-primario, #2563eb);
    color: var(--gf-color-primario, #2563eb);
    background: #eff6ff;
}

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

.gf-ct-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-ct-imagen-preview {
    position: relative;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    max-height: 260px;
    background: #f1f5f9;
}

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

.gf-ct-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 !important;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}

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

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

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

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

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

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

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

.gf-ct-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-ct-input-icon input::placeholder { color: #cbd5e1; }

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

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

/* ── Textarea abstract ─────────────────────────────── */
.gf-ct-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-ct-campo textarea:focus {
    border-color: var(--gf-color-primario, #2563eb);
    box-shadow: 0 0 0 3px rgba(37,99,235,.08);
    outline: none;
}

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

/* ── Quill editor ──────────────────────────────────── */
#gf-ct-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;
}

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

#gf-ct-quill-editor + .ql-toolbar { display: none; }

.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;
}

/* ── Grid de subcategorías ─────────────────────────── */
.gf-ct-subcats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gf-ct-subcat-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.gf-ct-subcat-item input[type="checkbox"] {
    display: none;
}

.gf-ct-subcat-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
    transition: all .2s;
    cursor: pointer;
}

.gf-ct-subcat-label i {
    font-size: 11px;
    color: #94a3b8;
    transition: color .2s;
}

.gf-ct-subcat-item input:checked + .gf-ct-subcat-label {
    background: var(--gf-color-primario, #2563eb);
    border-color: var(--gf-color-primario, #2563eb);
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(37,99,235,.25);
}

.gf-ct-subcat-item input:checked + .gf-ct-subcat-label i {
    color: rgba(255,255,255,.8);
}

.gf-ct-subcat-item:hover .gf-ct-subcat-label {
    border-color: var(--gf-color-primario, #2563eb);
    color: var(--gf-color-primario, #2563eb);
    background: #eff6ff;
}

.gf-ct-subcats-vacio {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    color: #94a3b8;
}

.gf-ct-subcats-vacio i {
    color: #cbd5e1;
    font-size: 15px;
}

/* ── Tags ──────────────────────────────────────────── */
.gf-ct-tags-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    background: #fff;
    cursor: text;
    transition: border-color .2s;
    min-height: 48px;
}

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

.gf-ct-tags-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gf-ct-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gf-color-primario, #2563eb);
    animation: gfChipIn .15s ease;
}

@keyframes gfChipIn {
    from { opacity: 0; transform: scale(.85); }
    to   { opacity: 1; transform: scale(1); }
}

.gf-ct-tag-chip button {
    background: none;
    border: none !important;
    color: #93c5fd;
    cursor: pointer;
    font-size: 11px;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    transition: color .15s;
}

.gf-ct-tag-chip button:hover { color: #dc2626; }

.gf-ct-tags-wrap input {
    border: none;
    outline: none;
    font-size: 14px;
    color: #1e293b;
    background: transparent;
    font-family: var(--gf-fuente-texto, 'Poppins', sans-serif);
    flex: 1;
    min-width: 140px;
    padding: 2px 0;
}

.gf-ct-tags-wrap input::placeholder { color: #cbd5e1; }

.gf-ct-tags-hint {
    font-size: 12px;
    color: #94a3b8;
    margin: 6px 0 0 !important;
}

.gf-ct-tags-hint kbd {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 11px;
    color: #475569;
}

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

.gf-ct-btn-guardar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 32px;
    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, #2563eb) !important;
    border-radius: 50px !important;
    color: var(--gf-color-primario, #2563eb) !important;
    background: transparent;
}

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

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

/* ── Modal overlay ─────────────────────────────────── */
.gf-ct-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-ct-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-ct-modal-icon {
    font-size: 48px;
    color: var(--gf-color-primario, #2563eb);
    margin-bottom: 16px;
    line-height: 1;
}

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

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

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

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

.gf-ct-btn-modal {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    border: 2px solid transparent !important;
    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-ct-btn-modal span {
    font-size: 12px;
    font-weight: 400;
    opacity: .75;
}

.gf-ct-btn-draft {
    background: #f1f5f9;
    color: #3c7df0!important;
    border-color: #e2e8f0 !important;
}

.gf-ct-btn-draft:hover {
    background: #3c7df0!important;
    border-color: #94a3b8 !important;
    color:#fff!important;
}

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

.gf-ct-btn-publish:hover {
    background: #3c7df0!important;
    border-color: #94a3b8 !important;
    color:#fff!important;
}

.gf-ct-modal-cancelar {
    background: none;
    border: none !important;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border-radius: 6px;
    transition: color .2s;
}

.gf-ct-modal-cancelar:hover { color: #475569; }

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

.gf-ct-btn-nueva {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #16a34a;
    background: #3c7df0!important;
    border: none !important;
    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-ct-btn-nueva:hover { background: #15803d !important; }

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