/* ResolverCrímenes AI - Public Frontend Styles */
/* Diseño compatible con cualquier tema WordPress */

.rc-caso,
.rc-interrogatorio,
.rc-prediccion {
    font-family: inherit;
    max-width: 100%;
}

/* =============================================
   SECTIONS
   ============================================= */
.rc-section {
    border: 1px solid #e2e2e2;
    border-top: 4px solid #1a56db;
    border-radius: 8px;
    margin-bottom: 24px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.rc-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e2e2e2;
}

.rc-section-header.rc-collapsible {
    cursor: pointer;
    user-select: none;
}

.rc-section-header.rc-collapsible:hover {
    background: #f0f2f5;
}

.rc-section-header h2 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 700;
    color: #1a1a2e;
    flex: 1;
}

.rc-icon {
    font-size: 1.3em;
}

.rc-chevron {
    font-size: 0.8em;
    color: #666;
    transition: transform 0.2s;
}

.rc-section-header.collapsed .rc-chevron {
    transform: rotate(-90deg);
}

.rc-section-body {
    padding: 20px;
}

.rc-section-body.collapsed {
    display: none;
}

/* =============================================
   INFORME POLICIAL
   ============================================= */
.rc-informe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.rc-dato {
    background: #f0f4ff;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.9em;
}

.rc-dato-label {
    display: block;
    font-weight: 700;
    color: #1a56db;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.rc-narration {
    border-left: 3px solid #1a56db;
    padding: 12px 16px;
    margin-top: 16px;
    background: #f8faff;
}

.rc-narration h4 {
    margin: 0 0 8px 0;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555;
}

.rc-narration p {
    margin: 0;
    line-height: 1.7;
}

/* =============================================
   VÍCTIMA
   ============================================= */
.rc-persona-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.rc-persona-foto img.rc-foto {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #e2e2e2;
    flex-shrink: 0;
}

.rc-persona-info h3 {
    margin: 0 0 4px 0;
    font-size: 1.3em;
}

.rc-persona-meta {
    color: #666;
    font-style: italic;
    margin-bottom: 8px;
}

/* =============================================
   PRUEBAS
   ============================================= */
.rc-pruebas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.rc-prueba-card {
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s;
}

.rc-prueba-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.rc-prueba-img img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.rc-prueba-placeholder {
    width: 100%;
    height: 100px;
    background: #f0f4ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
}

.rc-prueba-info {
    padding: 12px;
}

.rc-prueba-info h4 {
    margin: 0 0 6px 0;
    font-size: 0.95em;
    color: #1a1a2e;
}

.rc-prueba-info p {
    margin: 0 0 8px 0;
    font-size: 0.85em;
    color: #444;
    line-height: 1.5;
}

.rc-relevancia {
    font-size: 0.8em !important;
    color: #1a56db !important;
    padding: 6px 8px;
    background: #f0f4ff;
    border-radius: 4px;
}

/* =============================================
   INTERROGATORIO
   ============================================= */
.rc-interrogatorio-intro {
    margin: 8px 0 20px 0;
    color: #555;
    font-size: 0.95em;
}

.rc-sospechosos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.rc-sospechoso-card {
    border: 1px solid #e2e2e2;
    border-top: 4px solid #1a56db;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.rc-sospechoso-header {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e2e2e2;
    align-items: center;
}

.rc-sospechoso-foto-wrap {
    flex-shrink: 0;
}

img.rc-foto-sosp {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
}

.rc-foto-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #e8eaf6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    color: #666;
}

.rc-sosp-nombre {
    margin: 0 0 2px 0;
    font-size: 1em;
    font-weight: 700;
    color: #1a1a2e;
}

.rc-sosp-profesion {
    margin: 0 0 8px 0;
    font-size: 0.85em;
    color: #666;
    font-style: italic;
}

.rc-preguntas-counter {
    font-size: 0.8em;
    color: #444;
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 12px;
    display: inline-block;
}

.rc-usadas {
    color: #1a56db;
    font-weight: 700;
}

/* Declaración inicial */
.rc-declaracion-inicial {
    padding: 12px 16px;
    background: #fffbf0;
    border-bottom: 1px solid #f0e5c0;
    position: relative;
}

.rc-comilla {
    font-size: 2.5em;
    line-height: 1;
    color: #f59e0b;
    position: absolute;
    top: 4px;
    left: 12px;
}

.rc-declaracion-inicial p {
    margin: 0;
    padding-left: 24px;
    font-style: italic;
    color: #555;
    font-size: 0.9em;
    line-height: 1.5;
}

/* Chat de interrogatorio */
.rc-chat {
    flex: 1;
    padding: 12px 16px;
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rc-chat-pregunta {
    align-self: flex-end;
    background: #1a56db;
    color: #fff;
    padding: 8px 12px;
    border-radius: 12px 12px 2px 12px;
    max-width: 85%;
    font-size: 0.9em;
    line-height: 1.4;
}

.rc-chat-respuesta {
    align-self: flex-start;
    background: #f0f2f5;
    color: #1a1a2e;
    padding: 8px 12px;
    border-radius: 12px 12px 12px 2px;
    max-width: 90%;
    font-size: 0.9em;
    line-height: 1.5;
}

.rc-chat-loading {
    align-self: flex-start;
    font-style: italic;
    color: #888;
    font-size: 0.85em;
    padding: 4px 0;
}

/* Input area */
.rc-input-area {
    padding: 12px 16px;
    border-top: 1px solid #e2e2e2;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rc-pregunta-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9em;
    resize: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.rc-pregunta-input:focus {
    outline: none;
    border-color: #1a56db;
}

.rc-btn-preguntar {
    background: #1a56db;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85em;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.rc-btn-preguntar:hover {
    background: #1446b8;
}

.rc-btn-preguntar:disabled {
    background: #aaa;
    cursor: not-allowed;
}

.rc-agotado {
    padding: 12px 16px;
    border-top: 1px solid #e2e2e2;
    text-align: center;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 0.85em;
    font-weight: 600;
}

/* =============================================
   PREDICCIÓN
   ============================================= */
.rc-prediccion-intro {
    margin: 8px 0 20px 0;
    color: #555;
    font-size: 0.95em;
    line-height: 1.6;
}

.rc-prediccion-form {
    max-width: 600px;
}

.rc-field {
    margin-bottom: 20px;
}

.rc-field label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a2e;
}

.rc-select,
.rc-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.rc-select:focus,
.rc-textarea:focus {
    outline: none;
    border-color: #1a56db;
}

.rc-textarea {
    resize: vertical;
}

.rc-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.rc-btn-primary {
    background: #1a56db;
    color: #fff;
}

.rc-btn-primary:hover {
    background: #1446b8;
}

.rc-btn-large {
    padding: 14px 32px;
    font-size: 1em;
    letter-spacing: 0.5px;
}

.rc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Veredicto */
.rc-veredicto {
    margin-top: 24px;
    border-radius: 12px;
    overflow: hidden;
    animation: rc-fade-in 0.5s ease;
}

@keyframes rc-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.rc-veredicto-inner {
    padding: 28px;
    text-align: center;
}

.rc-veredicto-icon {
    font-size: 3em;
    margin-bottom: 12px;
}

.rc-veredicto-texto {
    font-size: 1em;
    line-height: 1.7;
    white-space: pre-wrap;
}

.rc-veredicto.correcto {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid #16a34a;
}

.rc-veredicto.incorrecto {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 2px solid #dc2626;
}

.rc-confesion {
    margin-top: 20px;
    padding: 16px 20px;
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
    font-style: italic;
    font-size: 1.1em;
    color: #333;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 600px) {
    .rc-sospechosos-grid {
        grid-template-columns: 1fr;
    }
    .rc-pruebas-grid {
        grid-template-columns: 1fr;
    }
    .rc-informe-grid {
        grid-template-columns: 1fr 1fr;
    }
    .rc-persona-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* =============================================
   RESOLUCIÓN DEL CASO
   ============================================= */

/* Pantalla de aviso spoiler */
.rc-spoiler-warning {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    color: #fff;
    margin-bottom: 24px;
}

.rc-spoiler-inner {
    max-width: 480px;
    margin: 0 auto;
}

.rc-spoiler-icon {
    font-size: 3.5em;
    margin-bottom: 16px;
}

.rc-spoiler-warning h2 {
    color: #ff6b6b;
    font-size: 1.8em;
    margin: 0 0 12px 0;
    letter-spacing: 2px;
}

.rc-spoiler-warning p {
    color: #ccc;
    margin: 0 0 28px 0;
    font-size: 1em;
    line-height: 1.6;
}

/* Reveal del culpable */
.rc-culpable-reveal {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    color: #fff;
    margin-bottom: 24px;
    animation: rc-fade-in 0.6s ease;
}

.rc-culpable-label {
    font-size: 0.75em;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #ff6b6b;
    font-weight: 700;
    margin-bottom: 20px;
}

.rc-culpable-foto {
    margin-bottom: 16px;
}

img.rc-foto-culpable {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #ff6b6b;
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.4);
}

.rc-culpable-nombre {
    margin: 0 0 8px 0;
    font-size: 2em;
    color: #fff;
    font-weight: 800;
}

.rc-culpable-profesion {
    color: #aaa;
    font-style: italic;
    font-size: 1em;
    margin: 0;
}

/* Confesión */
.rc-quote-confesion {
    margin: 0;
    padding: 20px 24px;
    background: #1a1a2e;
    border-left: 4px solid #ff6b6b;
    border-radius: 0 8px 8px 0;
    font-size: 1.15em;
    font-style: italic;
    color: #f0f0f0;
    line-height: 1.6;
}

/* Secretos grid */
.rc-secretos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.rc-secreto-card {
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    padding: 14px;
    background: #f8f9fa;
}

.rc-secreto-card.rc-es-culpable {
    border-color: #ff6b6b;
    background: #fff5f5;
}

.rc-secreto-card h4 {
    margin: 0 0 8px 0;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rc-secreto-card p {
    margin: 0;
    font-size: 0.85em;
    color: #555;
    line-height: 1.5;
}

.rc-badge-culpable {
    background: #ff6b6b;
    color: #fff;
    font-size: 0.7em;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.rc-btn-secondary {
    background: #f0f2f5;
    color: #1a1a2e;
    border: 1px solid #ddd;
}

.rc-btn-secondary:hover {
    background: #e0e3e8;
}

.rc-chat-error {
    color: #b91c1c !important;
    background: #fef2f2 !important;
    font-size: 0.85em;
}
