/**
 * Estilos para el Portal de Litigantes:
 * 1. Armonización simétrica de los botones [ Imprimir Cargo ] y [ Refrescar ]
 * 2. Tarjeta institucional del Tribunal Arbitral en la cabecera del expediente
 */

/* =========================================================================
   1. ARMONIZACIÓN DE BOTONES DEL EXPEDIENTE (PORTAL LITIGANTES)
   ========================================================================= */

#mpf-btn-print-cargo-link,
#mpf-btn-casillas-link,
.fs_ticket_refresh_btn,
.fs_ticket_actions_btn button,
.fs_ticket_actions button,
.fs_ticket_heroarea .el-button--default,
.fs_ticket_header .el-button--default,
.ticket_header_actions button {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding: 0 14px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border-radius: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

#mpf-btn-print-cargo-link {
    background-color: #d29c15 !important;
    border: 1px solid #b8870f !important;
    color: #0a0a0a !important;
    box-shadow: 0 1px 3px rgba(210, 156, 21, 0.25) !important;
}

#mpf-btn-print-cargo-link:hover {
    background-color: #d1b315 !important;
    border-color: #d29c15 !important;
    color: #000000 !important;
}

#mpf-btn-casillas-link {
    background-color: #0a0a0a !important;
    border: 1px solid #d29c15 !important;
    color: #d29c15 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

#mpf-btn-casillas-link:hover {
    background-color: #171717 !important;
    border-color: #d1b315 !important;
    color: #ffffff !important;
}

.fs_ticket_refresh_btn,
.fs_ticket_actions_btn button,
.fs_ticket_actions button,
.fs_ticket_heroarea .el-button--default,
.fs_ticket_header .el-button--default,
.ticket_header_actions button {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.fs_ticket_refresh_btn:hover,
.fs_ticket_actions_btn button:hover,
.fs_ticket_actions button:hover,
.fs_ticket_heroarea .el-button--default:hover,
.fs_ticket_header .el-button--default:hover,
.ticket_header_actions button:hover {
    background-color: #f8fafc !important;
    border-color: #d29c15 !important;
    color: #0a0a0a !important;
}

/* =========================================================================
   2. REORDENAMIENTO ESTRUCTURAL (TÍTULO -> TRIBUNAL -> BOTONES)
   ========================================================================= */

.fs_ticket_heroarea .fs_ticket_header,
.fs_ticket_wrapper .fs_ticket_header {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
}

.fs_tk_subject,
.fs_ticket_subject {
    width: 100% !important;
    margin-bottom: 10px !important;
}

.mpf-portal-tribunal-card {
    width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 4px !important;
    margin-bottom: 12px !important;
}

.fs_ticket_actions,
.fs_ticket_actions_btn {
    display: flex !important;
    justify-content: flex-end !important;
    width: 100% !important;
    margin-top: 2px !important;
    margin-bottom: 10px !important;
}

/* =========================================================================
   3. CARD INSTITUCIONAL DEL TRIBUNAL ARBITRAL (PORTAL LITIGANTES)
   ========================================================================= */

.mpf-portal-tribunal-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1e293b;
}

.mpf-pt-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.mpf-pt-title {
    font-size: 13px;
    font-weight: 700;
    color: #0a0a0a;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.mpf-pt-modality-badge {
    background: #e2e8f0;
    color: #334155;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.mpf-pt-body {
    padding: 14px 18px;
}

.mpf-pt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.mpf-pt-seat-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 80px;
    transition: all 0.2s ease;
}

.mpf-pt-seat-item:hover {
    border-color: #cbd5e1;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.mpf-pt-seat-role {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.mpf-pt-seat-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 4px;
}

.mpf-pt-empty {
    color: #94a3b8 !important;
    font-weight: 500 !important;
    font-style: italic;
}

.mpf-pt-seat-meta {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 6px;
}

.mpf-pt-tag {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    align-self: flex-start;
    margin-top: 4px;
}

.tag-designated {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.tag-notified {
    background: #fffdf5;
    color: #854d0e;
    border: 1px solid #fde68a;
}

.tag-accepted {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.tag-pending {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* =========================================================================
   4. DISTINTIVO OFICIAL PARA ACTUACIONES DEL ÁRBITRO / TRIBUNAL (PORTAL)
   ========================================================================= */

.fs_thread_ribbon.fs_thread_ribbon_arbitro,
span.fs_thread_ribbon_arbitro {
    background-color: #0a0a0a !important;
    background: #0a0a0a !important;
    color: #d1b315 !important;
    border-bottom: 2px solid #d29c15 !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    font-size: 10px !important;
    display: inline-block !important;
    padding: 3px 8px !important;
    border-radius: 3px !important;
    line-height: 1.2 !important;
}

/* En el portal de litigantes/árbitros no se utiliza borde vertical izquierdo (solo en el panel Staff) */
.fs_thread_arbitro .fs_thread_ribbon_customer_cc {
    background-color: #0a0a0a !important;
    background: #0a0a0a !important;
    border-bottom: 2px solid #d29c15 !important;
    color: #d1b315 !important;
}

/* =========================================================================
   5. MODAL DE CASILLAS DE NOTIFICACIÓN ELECTRÓNICA (COPIAS PROCESALES CC)
   ========================================================================= */

.mpf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 10, 0.78);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: mpfFadeIn 0.2s ease-out;
}

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

.mpf-modal-container {
    background: #ffffff;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    border-radius: 10px;
    border: 1px solid #d29c15;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: mpfSlideUp 0.25s ease-out;
}

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

.mpf-modal-header {
    background: #0a0a0a;
    padding: 16px 22px;
    border-bottom: 2px solid #d29c15;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mpf-modal-header-title {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.mpf-modal-header-subtitle {
    color: #94a3b8;
    font-size: 11.5px;
    margin-top: 3px;
    font-weight: 400;
}

.mpf-modal-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
    transition: all 0.2s ease;
}

.mpf-modal-close-btn:hover {
    color: #d29c15;
    background: rgba(255, 255, 255, 0.1);
}

.mpf-modal-body {
    padding: 22px;
    overflow-y: auto;
    font-size: 13px;
    color: #1e293b;
    line-height: 1.5;
}

.mpf-casilla-callout {
    background: #fffdf5;
    border: 1px solid #fde68a;
    border-left: 4px solid #d29c15;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 18px;
}

.mpf-casilla-callout p {
    margin: 0 0 6px 0;
    font-size: 12.5px;
    color: #451a03;
}

.mpf-casilla-callout small {
    display: block;
    font-size: 11.5px;
    color: #78350f;
    line-height: 1.4;
}

.mpf-casilla-titular-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mpf-titular-info strong {
    display: block;
    color: #0f172a;
    font-size: 13px;
}

.mpf-titular-info span {
    color: #64748b;
    font-size: 12px;
}

.mpf-titular-badge {
    background: #0a0a0a;
    color: #d29c15;
    border: 1px solid #d29c15;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.mpf-casilla-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
}

.mpf-casilla-section-title {
    font-weight: 700;
    font-size: 13px;
    color: #0f172a;
}

.mpf-casilla-counter {
    font-size: 11.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #475569;
}

.mpf-casilla-counter.full {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.mpf-casilla-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mpf-casilla-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.mpf-casilla-item:hover {
    border-color: #cbd5e1;
    background: #fafafa;
}

.mpf-casilla-item-email {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mpf-casilla-item-badge {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.mpf-casilla-del-btn {
    background: #ffffff;
    border: 1px solid #fca5a5;
    color: #dc2626;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.mpf-casilla-del-btn:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}

.mpf-casilla-empty {
    text-align: center;
    padding: 20px;
    color: #94a3b8;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    font-size: 12.5px;
}

.mpf-casilla-add-form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.mpf-casilla-input {
    flex: 1;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.mpf-casilla-input:focus {
    outline: none;
    border-color: #d29c15;
    box-shadow: 0 0 0 3px rgba(210, 156, 21, 0.15);
}

.mpf-casilla-add-btn {
    height: 38px;
    padding: 0 16px;
    background: #0a0a0a;
    color: #d29c15;
    border: 1px solid #d29c15;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mpf-casilla-add-btn:hover:not(:disabled) {
    background: #171717;
    border-color: #d1b315;
    color: #ffffff;
}

.mpf-casilla-add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mpf-modal-footer {
    background: #f8fafc;
    padding: 12px 22px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}

.mpf-modal-close-footer-btn {
    height: 32px;
    padding: 0 16px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    border-radius: 5px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
}

.mpf-modal-close-footer-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.mpf-casilla-alert {
    padding: 9px 14px;
    border-radius: 5px;
    font-size: 12px;
    margin-top: 10px;
    display: none;
}

.mpf-casilla-alert.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.mpf-casilla-alert.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* =========================================================================
   3. ARMONIZACIÓN Y LIMPIEZA DEL EDITOR DE RESPUESTA EN PORTAL
   ========================================================================= */

/* Descongestionar el encabezado "Escribe una respuesta" al hacer focus */
.fs_client_portal .fs_ticket_reply_box.fs_ticket_reply_header h3,
.fs_client_portal .fs_ticket_reply_box h3,
.fs_ticket_reply_box.fs_ticket_reply_header h3,
.fs_ticket_reply_box h3,
.fs_reply_head,
.fs_ticket_reply_box .fs_reply_head,
.fs_reply_box .fs_reply_head {
    position: static !important;
    display: block !important;
    width: 100% !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    float: none !important;
    text-align: left !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
}

/* Ocultar botones y pestañas de modo Visual / Código para mantener la vista limpia en visual */
.wp_vue_editor_wrapper .wp-editor-tabs,
.wp-editor-tabs,
.wp-switch-editor,
.switch-tmce,
.switch-html,
.fs_editor_mode_buttons,
.fs_mode_switch,
.fs_editor_toggle {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden !important;
}

/* Caja de Acto Procesal / Tipo de Escrito en el Portal */
#mpf-portal-response-box {
    display: block !important;
    width: 100% !important;
    flex: 1 1 100% !important;
    max-width: 100% !important;
    clear: both !important;
    margin: 10px 0 16px 0 !important;
    box-sizing: border-box !important;
    position: static !important;
}

