/* ================================================================
   COMENTARIOS ECONOMIPEDIA — Panel lateral
   ================================================================ */

/* Ocultar aviso Akismet */
.akismet_comment_form_privacy_notice,
p.akismet_comment_form_privacy_notice { display: none !important; }

/* ── PREVIEW (2 comentarios + botón) ─────────────────────────── */

.econo-comentarios-wrap {
    margin-top: 2rem;
}

.econo-comentarios-titulo {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1B3E6B;
    margin-bottom: 1rem;
}

.econo-comentarios-preview {
    margin-bottom: 1rem;
}

.econo-preview-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.econo-preview-item:last-child {
    border-bottom: none;
}

.econo-preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.econo-preview-header img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}

.econo-preview-autor {
    font-size: 13px;
    font-weight: 700;
    color: #1D75C2;
}

.econo-preview-fecha {
    font-size: 12px;
    color: #999;
}

.econo-preview-num {
    font-size: 12px;
    color: #bbb;
    margin-left: auto;
}

.econo-preview-texto {
    font-size: 18px;
    color: #444;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.econo-preview-texto p { margin: 0; }

/* Botón principal */
.econo-comentarios-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #1D75C2;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 2rem;
    transition: background 0.2s;
}

.econo-comentarios-btn:hover { background: #155fa0; }

/* ── OVERLAY ──────────────────────────────────────────────────── */

.econo-panel-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9998;
}

.econo-panel-overlay.econo-overlay-open {
    display: block;
}

/* ── PANEL LATERAL ────────────────────────────────────────────── */

.econo-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 620px;
    max-width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
}

/* Cuando la barra de admin de WordPress está visible */
.admin-bar .econo-panel {
    top: 32px;
    height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
    .admin-bar .econo-panel {
        top: 46px;
        height: calc(100vh - 46px);
    }
}

.econo-panel.econo-panel-open {
    transform: translateX(0);
}

/* Header del panel */
.econo-panel-header {
    background: #1D75C2;
    color: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.econo-panel-volver {
    background: none;
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    padding: 0;
    letter-spacing: 0.04em;
}

.econo-panel-volver:hover { opacity: 0.8; }

.econo-panel-titulo {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.econo-panel-cerrar-x {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 0 0 8px;
    opacity: 0.85;
    flex-shrink: 0;
}

.econo-panel-cerrar-x:hover { opacity: 1; }

/* Cuerpo scrollable */
.econo-panel-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

.econo-panel-lista {
    padding: 16px 16px 0;
}

/* Contador */
.econo-panel-count {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1B3E6B;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e8f0;
}

/* Comentario en el panel */
.econo-panel-comment {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.econo-panel-comment:last-of-type {
    border-bottom: none;
}

.econo-panel-comment.econo-comment-reply {
    margin-left: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid #e0e8f0;
}

.econo-panel-comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.econo-panel-comment-header img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.econo-panel-autor {
    font-size: 13px;
    font-weight: 700;
    color: #222;
}

.econo-panel-fecha {
    font-size: 11px;
    color: #999;
}

.econo-panel-num {
    font-size: 13px;
    font-weight: 700;
    color: #bbb;
    margin-left: auto;
}

.econo-panel-comment-texto {
    font-size: 18px;
    color: #333;
    line-height: 1.6;
    overflow-wrap: break-word;
    word-break: break-word;
}

.econo-panel-comment-texto p { margin: 0 0 6px; }

.econo-panel-responder {
    background: none;
    border: 1px solid #1D75C2;
    color: #1D75C2;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 6px;
    transition: all 0.2s;
}

.econo-panel-responder:hover {
    background: #1D75C2;
    color: #fff;
}

/* Reply to */
.econo-panel-reply-to {
    background: #f0f6ff;
    border-left: 3px solid #1D75C2;
    padding: 8px 12px;
    font-size: 13px;
    color: #555;
    margin-bottom: 12px;
    border-radius: 0 4px 4px 0;
    align-items: center;
    gap: 8px;
}

.econo-cancel-reply {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    margin-left: auto;
    padding: 0 4px;
}

/* ── FORMULARIO EN EL PANEL ───────────────────────────────────── */

.econo-panel-form {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e0e8f0;
}

.econo-form-titulo {
    font-size: 1rem;
    font-weight: 700;
    color: #1B3E6B;
    margin: 0 0 10px;
}

.econo-form-row { margin-bottom: 12px; }

.econo-form-input,
.econo-form-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d0dae6;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s;
}

.econo-form-input:focus,
.econo-form-textarea:focus {
    outline: none;
    border-color: #1D75C2;
}

.econo-form-textarea {
    resize: vertical;
    min-height: 90px;
}

.econo-optin-label,
.econo-privacidad-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    line-height: 1.5;
}

.econo-optin-label input,
.econo-privacidad-label input {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #1D75C2;
}

.econo-privacidad-label a { color: #1D75C2; }

.econo-form-optin,
.econo-form-privacidad { margin-bottom: 10px; }


    font-size: 10px;
    color: #bbb;
    margin-top: 8px;
    line-height: 1.4;
}

.econo-recaptcha-notice a { color: #bbb; text-decoration: underline; }

/* ── FORMULARIO STICKY ────────────────────────────────────────── */

/* Ocultar textos innecesarios */
.econo-panel-form .comment-notes,
.econo-panel-form .logged-in-as,
.econo-panel-form .econo-recaptcha-notice { display: none !important; }

.econo-panel-form {
    flex-shrink: 0;
    background: #fff;
    border-top: 2px solid #e0e8f0;
    padding: 10px 16px;
}

.econo-form-comment-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    margin-bottom: 0;
}

.econo-form-comment-row .econo-form-textarea {
    flex: 1;
    min-height: 42px;
    max-height: 120px;
    resize: none;
    width: auto;
}

.econo-btn-submit {
    background: #1D75C2;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    width: auto !important;
    transition: background 0.2s;
    align-self: flex-end;
    height: 42px;
}

.econo-btn-submit:hover { background: #155fa0; }

/* ── MÓVIL ────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .econo-panel {
        width: 100vw;
        max-width: 100vw;
    }

    .econo-panel-titulo {
        display: none;
    }

    .econo-panel-volver {
        font-size: 22px;
    }

    .econo-panel-volver span {
        font-size: 13px;
    }
}

/* Admin bar en móvil — ajustar también el overlay */
@media screen and (max-width: 782px) {
    .admin-bar .econo-panel-overlay {
        top: 46px;
    }
}
