/* ============================================
   Canal de Denuncias CEPRI — Estilos Frontend
   ============================================ */

/* Wrapper general */
.cdc-formulario-wrapper,
.cdc-consulta-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

/* Fieldsets */
.cdc-fieldset {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.cdc-legend {
    font-size: 18px;
    font-weight: 700;
    color: #1a3a5c;
    padding: 0 12px;
    background: #fff;
}

/* Textos de instrucciones */
.cdc-instrucciones {
    color: #555;
    margin-bottom: 16px;
}

.cdc-ayuda {
    color: #888;
    font-size: 13px;
    font-style: italic;
    margin-bottom: 12px;
}

.cdc-opcional {
    font-weight: 400;
    font-size: 13px;
    color: #999;
}

/* Inputs y textareas */
.cdc-input,
.cdc-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.cdc-input:focus,
.cdc-textarea:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.15);
    outline: none;
}

.cdc-input-inline {
    width: auto;
    display: inline-block;
    margin-left: 8px;
    min-width: 200px;
}

/* Form rows */
.cdc-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.cdc-form-row .cdc-form-group {
    flex: 1;
}

.cdc-form-group {
    margin-bottom: 16px;
}

.cdc-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #444;
}

/* Checkboxes y radios */
.cdc-checkbox-group,
.cdc-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cdc-checkbox-label,
.cdc-radio-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.cdc-checkbox-label:hover,
.cdc-radio-label:hover {
    background-color: #f5f8fb;
}

.cdc-checkbox-label input[type="checkbox"],
.cdc-radio-label input[type="radio"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: #0073aa;
}

.cdc-checkbox-label span,
.cdc-radio-label span {
    line-height: 1.4;
}

.cdc-otros-label {
    flex-wrap: wrap;
    align-items: center;
}

/* Campo obligatorio */
.cdc-obligatorio {
    border-left: 3px solid #0073aa;
    padding-left: 12px;
}

/* Aviso */
.cdc-aviso {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fff8e1;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 14px;
    margin-bottom: 16px;
}

.cdc-aviso-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.cdc-aviso p {
    margin: 0;
    color: #856404;
}

/* Upload area */
.cdc-upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    position: relative;
}

.cdc-upload-area:hover,
.cdc-upload-area.cdc-drag-over {
    border-color: #0073aa;
    background-color: #f0f8ff;
}

.cdc-upload-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.cdc-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.cdc-archivos-lista {
    margin-top: 12px;
}

.cdc-archivo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    padding: 8px 14px;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 14px;
}

.cdc-archivo-item .cdc-archivo-nombre {
    color: #333;
}

.cdc-archivo-item .cdc-archivo-tamano {
    color: #888;
    font-size: 12px;
    margin-left: 10px;
}

.cdc-archivo-item .cdc-archivo-eliminar {
    color: #dc3545;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 18px;
    padding: 0 4px;
}

/* Contacto opciones */
.cdc-contacto-opciones {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

/* Protección de datos */
.cdc-proteccion-datos-texto {
    margin-bottom: 16px;
}

.cdc-proteccion-datos-texto details {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.cdc-proteccion-datos-texto summary {
    padding: 14px;
    background: #f8f9fa;
    cursor: pointer;
    user-select: none;
}

.cdc-proteccion-datos-texto summary:hover {
    background: #e9ecef;
}

.cdc-legal-text {
    padding: 20px;
    font-size: 13px;
    color: #555;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.7;
}

.cdc-legal-text p {
    margin-bottom: 12px;
}

.cdc-legal-text ol {
    padding-left: 20px;
}

.cdc-legal-text li {
    margin-bottom: 8px;
}

/* Botones */
.cdc-form-actions {
    text-align: center;
    margin: 30px 0 20px;
}

.cdc-btn {
    display: inline-block;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    font-family: inherit;
}

.cdc-btn-primary {
    background: #0073aa;
    color: #fff;
}

.cdc-btn-primary:hover {
    background: #005a87;
}

.cdc-btn-primary:active {
    transform: scale(0.98);
}

.cdc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mensajes */
.cdc-mensaje {
    padding: 16px;
    border-radius: 6px;
    margin-top: 16px;
    text-align: center;
    font-weight: 600;
}

.cdc-mensaje-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.cdc-mensaje-exito {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Acuse de recibo */
.cdc-acuse {
    max-width: 700px;
    margin: 0 auto;
}

.cdc-acuse-inner {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.cdc-acuse-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.cdc-acuse-inner h2 {
    color: #155724;
    margin-bottom: 12px;
}

.cdc-acuse-codigo {
    background: #e8f4fd;
    border: 2px solid #0073aa;
    border-radius: 10px;
    padding: 24px;
    margin: 24px 0;
}

.cdc-acuse-codigo p {
    margin: 0 0 8px;
    color: #666;
}

.cdc-codigo {
    font-size: 28px;
    font-weight: 800;
    color: #0073aa;
    letter-spacing: 3px;
    font-family: 'Courier New', monospace;
}

.cdc-acuse-info {
    text-align: left;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.cdc-acuse-info ul {
    margin: 10px 0;
    padding-left: 20px;
}

.cdc-acuse-info li {
    margin-bottom: 6px;
}

.cdc-acuse-legal {
    font-size: 12px;
    color: #999;
    margin-top: 20px;
    font-style: italic;
}

/* Acuse de recibo - textos adicionales */
.cdc-acuse-subtitulo {
    color: #888;
    font-size: 13px;
    font-style: italic;
    margin-top: -8px;
    margin-bottom: 20px;
}

.cdc-acuse-cuerpo {
    text-align: left;
    line-height: 1.8;
    color: #444;
    padding: 10px 0;
}

.cdc-acuse-cuerpo p {
    margin-bottom: 14px;
}

.cdc-acuse-fecha {
    font-size: 13px;
    color: #666;
    margin-top: 8px !important;
}

.cdc-acuse-pie {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #ddd;
    text-align: left;
}

.cdc-acuse-pie p {
    font-size: 12px;
    color: #888;
    line-height: 1.6;
}

.cdc-acuse-pie a {
    color: #0073aa;
}

/* ============================================
   Consulta de estado
   ============================================ */
.cdc-consulta-titulo {
    color: #1a3a5c;
    margin-bottom: 12px;
}

.cdc-consulta-row {
    align-items: flex-end;
}

.cdc-input-codigo {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.cdc-btn-consultar {
    white-space: nowrap;
    height: fit-content;
}

.cdc-consulta-form-container {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}

/* Resultado de consulta */
.cdc-resultado-consulta {
    margin-top: 24px;
}

.cdc-expediente {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.cdc-expediente h3 {
    color: #1a3a5c;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #0073aa;
}

.cdc-expediente-estado {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.cdc-estado-label {
    font-weight: 600;
    color: #666;
}

/* Badges de estado */
.cdc-estado-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: none;
}

.cdc-estado-recibida {
    background: #cce5ff;
    color: #004085;
}

.cdc-estado-en_investigacion {
    background: #fff3cd;
    color: #856404;
}

.cdc-estado-pendiente_documentacion {
    background: #ffeeba;
    color: #856404;
}

.cdc-estado-resuelta {
    background: #d4edda;
    color: #155724;
}

.cdc-estado-archivada {
    background: #e2e3e5;
    color: #383d41;
}

/* Fechas */
.cdc-expediente-fechas {
    background: #f8f9fa;
    padding: 14px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.cdc-expediente-fechas p {
    margin: 4px 0;
    font-size: 14px;
}

/* Timeline */
.cdc-timeline {
    position: relative;
    padding-left: 30px;
}

.cdc-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ddd;
}

.cdc-timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding: 14px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #0073aa;
}

.cdc-timeline-item::before {
    content: '';
    position: absolute;
    left: -27px;
    top: 18px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0073aa;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #0073aa;
}

.cdc-timeline-fecha {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.cdc-timeline-tipo {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.cdc-timeline-contenido p {
    margin: 6px 0 0;
}

.cdc-expediente-legal {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 14px;
}

.cdc-texto-pequeno {
    font-size: 12px;
    color: #999;
    font-style: italic;
}

/* Alerta de solicitud de documentación */
.cdc-alerta-solicitud {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-left: 4px solid #ffc107;
    border-radius: 6px;
    padding: 16px 20px;
    margin: 20px 0;
    color: #856404;
}

.cdc-alerta-solicitud strong {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
}

.cdc-alerta-solicitud p {
    margin: 0;
    font-size: 14px;
}

/* Respuesta del informante en timeline */
.cdc-timeline-respuesta_denunciante {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.cdc-timeline-tipo-respuesta {
    background: #4caf50 !important;
    color: #fff !important;
}

/* Formulario de respuesta del denunciante */
.cdc-respuesta-wrapper {
    margin-top: 24px;
    padding: 24px;
    background: #f0f7ff;
    border: 1px solid #b3d4fc;
    border-radius: 8px;
}

.cdc-respuesta-titulo {
    margin: 0 0 6px;
    color: #1a3a5c;
    font-size: 17px;
}

.cdc-respuesta-instrucciones {
    margin: 0 0 16px;
    font-size: 13px;
    color: #666;
}

/* Expediente cerrado */
.cdc-expediente-cerrado {
    margin-top: 20px;
    padding: 16px 20px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #666;
    text-align: center;
}

/* Responsive */
@media (max-width: 600px) {
    .cdc-fieldset {
        padding: 16px;
    }
    .cdc-form-row {
        flex-direction: column;
        gap: 0;
    }
    .cdc-consulta-row {
        flex-direction: column;
        align-items: stretch;
    }
    .cdc-btn-consultar {
        width: 100%;
        margin-top: 10px;
    }
    .cdc-acuse-inner {
        padding: 24px;
    }
    .cdc-codigo {
        font-size: 22px;
        letter-spacing: 1px;
    }
    .cdc-input-inline {
        display: block;
        margin-left: 0;
        margin-top: 6px;
        min-width: 100%;
    }
}
