/* Bloquea el scroll del body cuando el modal está abierto */
body.kouch-modal-open {
    overflow: hidden;
}

/* El fondo oscuro (overlay) */
.kouch-apply-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
}

/* El contenedor del modal */
.kouch-modal-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 600px;
    position: relative;
    padding: 30px 40px;
    animation: kouch-modal-fadein 0.3s ease;
}

@keyframes kouch-modal-fadein {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Botón de cerrar (X) - Versión Mejorada */
.kouch-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #f1f5f9; /* Un gris más suave */
    border: none;
    border-radius: 50%;
    width: 32px; /* Ligeramente más grande */
    height: 32px;
    cursor: pointer;
    transition: all 0.2s ease;
    /* Quitamos el contenido de texto */
    font-size: 0;
    color: transparent;
}

/* Creamos la 'X' con pseudo-elementos */
.kouch-modal-close::before,
.kouch-modal-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px; /* Longitud de las barras */
    height: 2px; /* Grosor de las barras */
    background-color: #64748b; /* Un gris más oscuro */
    border-radius: 2px;
    transition: all 0.2s ease;
}

.kouch-modal-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.kouch-modal-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Efecto Hover */
.kouch-modal-close:hover {
    background-color: #e2e8f0; /* Un gris más oscuro */
}

.kouch-modal-close:hover::before,
.kouch-modal-close:hover::after {
    background-color: #1e293b; /* Casi negro */
}

/* Contenido del modal */
.kouch-modal-content {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 10px; /* Espacio para el scrollbar */
}

/* Títulos H3 y H4 */
.kouch-modal-content h3 {
    font-family: 'Roboto', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}
.kouch-modal-content h4 {
    font-size: 18px;
    font-weight: 600;
    color: #444;
    margin-top: 25px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

/* Botones del modal */
.kouch-modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.kouch-modal-btn {
    font-family: 'Roboto', sans-serif;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}
.kouch-modal-btn.primary {
    background-color: #1A73E8; /* Azul */
    color: #ffffff;
}
.kouch-modal-btn.primary:hover {
    background-color: #0c5abf;
}
.kouch-modal-btn.secondary {
    background-color: #f0f0f0;
    color: #555;
}
.kouch-modal-btn.secondary:hover {
    background-color: #e0e0e0;
}

/* Estilos del formulario */
.kouch-form-group {
    margin-bottom: 20px;
}
.kouch-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}
.kouch-radio-group {
    display: flex;
    gap: 20px;
}
.kouch-radio-group label {
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Editor de texto Quill */
#kouch-cover-letter-editor {
    background: #fff;
    border-radius: 8px;
}
.ql-toolbar {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}
.ql-container {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Listas (para advertencias) */
.kouch-modal-content ul {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px 15px 15px 35px;
}
.kouch-modal-content li {
    margin-bottom: 8px;
}
.kouch-modal-content li:last-child {
    margin-bottom: 0;
}

/* Mensajes de error */
.kouch-modal-message.error {
    text-align: center;
    color: #D8000C; /* Rojo error */
    background-color: #FFD2D2;
    border: 1px solid #D8000C;
    border-radius: 8px;
    padding: 15px;
}
.kouch-modal-message.error h4 {
    margin: 0 0 10px 0;
    border: none;
}

/* Loader */
.kouch-loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1A73E8;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: kouch-spin 1s linear infinite;
    margin: 20px auto 0;
}
@keyframes kouch-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* --- AÑADE ESTO AL FINAL DE TU ARCHIVO kouch-apply.css --- */

/* Mensajes de información (para 'Ya aplicaste') */
.kouch-modal-message.info {
    text-align: center;
    color: #00529B; /* Azul oscuro */
    background-color: #BDE5F8; /* Azul claro */
    border: 1px solid #BDE5F8;
    border-radius: 8px;
    padding: 30px 35px; /* Más padding para que se vea como la captura */
}

/* Estilo para "¡Gracias!" */
.kouch-modal-message.info h3 {
    font-family: 'Roboto', sans-serif;
    font-size: 24px; /* Tamaño grande */
    font-weight: 700;
    color: #00529B;
    margin: 0 0 10px 0;
    text-align: center;
    border: none;
}

/* Estilo para el texto (MÁS GRANDE) */
.kouch-modal-message.info p {
    margin: 0;
    font-size: 18px; /* --- TAMAÑO CORREGIDO --- */
    line-height: 1.5;
    color: #00529B;
}

/* Mensajes de éxito (para 'Aplicación Enviada') */
.kouch-modal-message.success {
    text-align: center;
    color: #270; /* Verde oscuro */
    background-color: #DFF2BF; /* Verde claro */
    border: 1px solid #DFF2BF;
    border-radius: 8px;
    padding: 15px 20px;
}
/* Hacemos que el H3 de éxito combine */
.kouch-modal-message.success h3 {
     color: #270;
}
.kouch-modal-message.success p {
    margin: 0 0 20px 0; /* Espacio antes del botón */
}


/* --- AÑADE ESTO AL FINAL DE TU kouch-apply.css --- */

/* Contenedor principal de los 3 botones */
.kouch-job-actions-container {
    display: flex;
    align-items: center;
    gap: 12px; /* Espacio entre botones */
}

/* Estilo base para TODOS los botones */
.kouch-job-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 12px;
}

.kouch-job-action-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.08);
}

/* 1. Estilo específico del botón "Aplicar" */
.kouch-job-action-btn.apply-btn {
    background: linear-gradient(135deg, #5557b0, #9a9cff); /* Gradiente de tu botón */
    color: white;
    padding: 12px 44px; /* Tu padding original */
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.kouch-job-action-btn.apply-btn:hover {
    background: linear-gradient(135deg, #4a4c9a, #8587e6);
}
.kouch-job-action-btn.apply-btn:disabled {
    background: #cccccc;
    color: #666666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


/* 2. Estilo de los botones de Icono (Guardar y Compartir) */
.kouch-job-action-btn.save-btn,
.kouch-job-action-btn.share-btn {
    background-color: #F6F6FF; /* Tu color de fondo */
    width: 48px;  /* Ancho (mismo que alto) */
    height: 48px; /* Alto (basado en padding 12px + font-size 24px) */
    padding: 12px;
}
.kouch-job-action-btn.save-btn:hover,
.kouch-job-action-btn.share-btn:hover {
    background-color: #ededff; /* Un poco más oscuro al pasar el ratón */
}

/* Estilo de los iconos SVG dentro de los botones */
.kouch-job-action-btn svg {
    width: 24px;
    height: 24px;
    color: #5557B0; /* Tu color de icono */
}

/* 3. Feedback de "Compartir" */
.kouch-share-feedback {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #5557B0;
    margin-top: 10px;
    font-weight: 500;
}