/*
==============================================
  MODAL CV — COMPLETO (opciones + vista previa)
  Reemplaza el bloque anterior en styles.css
==============================================
*/

/* ══════════════════════════════════════
   MODAL 1 — Opciones (descargar / previa)
   ══════════════════════════════════════ */

.cv-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cv-modal-overlay.active {
    display: flex;
    animation: cv-overlay-in 0.3s ease;
}

@keyframes cv-overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.cv-modal-container {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: rgba(20, 20, 30, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(11, 206, 175, 0.25);
    border-radius: 24px;
    padding: 48px 40px 40px;
    text-align: center;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(11, 206, 175, 0.1),
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(11, 206, 175, 0.07);
    animation: cv-modal-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cv-modal-in {
    from { opacity: 0; transform: translateY(30px) scale(0.92); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.cv-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 10;
}

.cv-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.cv-modal-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(11, 206, 175, 0.2), rgba(11, 206, 175, 0.05));
    border: 1px solid rgba(11, 206, 175, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-modal-icon .fa {
    font-size: 32px;
    color: #0bceaf;
}

.cv-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px;
}

.cv-modal-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
    margin: 0 0 28px;
}

.cv-modal-file-info {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 28px;
    text-align: left;
}

.cv-file-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 10px;
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-file-icon .fa {
    font-size: 20px;
    color: #e55;
}

.cv-file-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.cv-file-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cv-file-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.cv-modal-actions {
    display: flex;
    gap: 12px;
}

.cv-action-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.25s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.cv-action-download {
    background: #0bceaf;
    color: #fff !important;
    border-color: #0bceaf;
}

.cv-action-download:hover {
    background: #09b89b;
    border-color: #09b89b;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(11, 206, 175, 0.4);
}

.cv-action-preview {
    background: transparent;
    color: rgba(255, 255, 255, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.2);
}

.cv-action-preview:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff !important;
    transform: translateY(-2px);
}

.cv-modal-decoration {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.cv-deco-1 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(11, 206, 175, 0.08) 0%, transparent 70%);
    top: -60px;
    right: -60px;
}

.cv-deco-2 {
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(11, 206, 175, 0.05) 0%, transparent 70%);
    bottom: -40px;
    left: -40px;
}

/* ══════════════════════════════════════
   MODAL 2 — Vista previa PDF
   ══════════════════════════════════════ */

.cv-preview-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.cv-preview-overlay.active {
    display: flex;
    animation: cv-overlay-in 0.25s ease;
}

.cv-preview-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 860px;
    height: 90vh;
    background: rgba(18, 18, 28, 0.97);
    border: 1px solid rgba(11, 206, 175, 0.2);
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(11, 206, 175, 0.08),
        0 40px 100px rgba(0, 0, 0, 0.7);
    animation: cv-modal-in 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
}

/* Header del visor */
.cv-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    flex-shrink: 0;
}

.cv-preview-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
}

.cv-preview-header-left .fa {
    font-size: 18px;
    color: #e55;
    flex-shrink: 0;
}

.cv-preview-header-left span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cv-preview-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Botón descargar en el header del visor */
.cv-preview-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    background: #0bceaf;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.cv-preview-action-btn:hover {
    background: #09b89b;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(11, 206, 175, 0.35);
}

/* Botón cerrar del visor */
.cv-preview-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.cv-preview-close-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    transform: rotate(90deg);
}

/* Cuerpo del visor */
.cv-preview-body {
    position: relative;
    flex: 1;
    overflow: hidden;
}

/* Spinner de carga */
.cv-preview-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    background: rgba(18, 18, 28, 0.97);
    z-index: 2;
}

.cv-preview-loading .fa {
    font-size: 32px;
    color: #0bceaf;
}

.cv-preview-loading.hidden {
    display: none;
}

/* iFrame del PDF */
.cv-preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ══════════════════════════════════════
   TEMA CLARO
   ══════════════════════════════════════ */

.white-vertion .cv-modal-container {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(11, 206, 175, 0.3);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
}

.white-vertion .cv-modal-title { color: #1a1a2e; }

.white-vertion .cv-modal-subtitle { color: rgba(0, 0, 0, 0.5); }

.white-vertion .cv-modal-close {
    border-color: rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.5);
}

.white-vertion .cv-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1a1a2e;
}

.white-vertion .cv-modal-file-info {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
}

.white-vertion .cv-file-name { color: #1a1a2e; }

.white-vertion .cv-file-meta { color: rgba(0, 0, 0, 0.4); }

.white-vertion .cv-action-preview {
    color: rgba(0, 0, 0, 0.6) !important;
    border-color: rgba(0, 0, 0, 0.2);
}

.white-vertion .cv-action-preview:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #1a1a2e !important;
}

.white-vertion .cv-preview-container {
    background: rgba(245, 245, 250, 0.98);
    border-color: rgba(11, 206, 175, 0.25);
}

.white-vertion .cv-preview-header {
    border-bottom-color: rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.02);
}

.white-vertion .cv-preview-header-left { color: rgba(0, 0, 0, 0.6); }

.white-vertion .cv-preview-close-btn {
    border-color: rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.5);
}

.white-vertion .cv-preview-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1a1a2e;
}

.white-vertion .cv-preview-loading {
    background: rgba(245, 245, 250, 0.98);
    color: rgba(0, 0, 0, 0.4);
}

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */

@media (max-width: 480px) {
    .cv-modal-container {
        padding: 40px 24px 32px;
        border-radius: 20px;
    }

    .cv-modal-actions {
        flex-direction: column;
    }

    .cv-modal-title { font-size: 20px; }

    .cv-preview-container {
        height: 95vh;
        border-radius: 16px;
    }

    .cv-preview-header {
        padding: 10px 14px;
    }

    .cv-preview-action-btn span {
        display: none;
    }

    .cv-preview-action-btn {
        padding: 8px 12px;
    }
}


/*
==============================================
  MODAL 3 — Confirmación descarga / Mensaje reclutadores
  Agregar al final de styles.css
==============================================
*/

/* ── Overlay ── */
.cv-success-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cv-success-overlay.active {
    display: flex;
    animation: cv-overlay-in 0.3s ease;
}

/* ── Contenedor ── */
.cv-success-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: rgba(14, 14, 22, 0.97);
    border: 1px solid rgba(11, 206, 175, 0.3);
    border-radius: 28px;
    padding: 44px 36px 32px;
    text-align: center;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(11, 206, 175, 0.12),
        0 40px 100px rgba(0, 0, 0, 0.7),
        0 0 80px rgba(11, 206, 175, 0.06);
    animation: cv-success-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cv-success-in {
    from { opacity: 0; transform: scale(0.8) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Partículas decorativas ── */
.cv-success-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    color: #0bceaf;
    font-size: 12px;
    opacity: 0;
    animation: particle-float 3s ease-in-out infinite;
}

.p1 { top: 15%; left: 10%; animation-delay: 0s;    font-size: 10px; }
.p2 { top: 20%; right: 12%; animation-delay: 0.4s; font-size: 8px;  color: rgba(11,206,175,0.6); }
.p3 { top: 60%; left: 6%;   animation-delay: 0.8s; font-size: 14px; }
.p4 { top: 70%; right: 8%;  animation-delay: 1.2s; font-size: 10px; color: rgba(11,206,175,0.5); }
.p5 { top: 40%; left: 92%;  animation-delay: 1.6s; font-size: 9px;  }
.p6 { top: 85%; left: 20%;  animation-delay: 2s;   font-size: 11px; color: rgba(11,206,175,0.4); }

@keyframes particle-float {
    0%   { opacity: 0;   transform: translateY(0)    rotate(0deg);   }
    20%  { opacity: 0.8; }
    80%  { opacity: 0.4; }
    100% { opacity: 0;   transform: translateY(-30px) rotate(180deg); }
}

/* ── Ícono de éxito ── */
.cv-success-icon {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-success-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid #0bceaf;
    animation: ring-pulse 2s ease-in-out infinite;
}

@keyframes ring-pulse {
    0%, 100% { transform: scale(1);    opacity: 1;   box-shadow: 0 0 0 0 rgba(11,206,175,0.4); }
    50%       { transform: scale(1.08); opacity: 0.8; box-shadow: 0 0 0 10px rgba(11,206,175,0); }
}

.cv-success-check {
    font-size: 34px;
    color: #0bceaf;
    animation: check-bounce 0.6s cubic-bezier(0.34, 1.8, 0.64, 1) 0.2s both;
    position: relative;
    z-index: 1;
}

@keyframes check-bounce {
    from { transform: scale(0) rotate(-30deg); opacity: 0; }
    to   { transform: scale(1) rotate(0deg);   opacity: 1; }
}

/* ── Textos principales ── */
.cv-success-title {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}

.cv-success-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 18px;
}

/* ── Ruta del archivo ── */
.cv-success-path {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(11, 206, 175, 0.08);
    border: 1px solid rgba(11, 206, 175, 0.2);
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 24px;
}

.cv-success-path .fa {
    color: #0bceaf;
    font-size: 15px;
    flex-shrink: 0;
}

.cv-success-path-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.3px;
}

/* ── Separador ── */
.cv-success-divider {
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(11, 206, 175, 0.3),
        transparent
    );
    margin: 0 0 22px;
}

/* ── Bloque reclutadores ── */
.cv-success-recruiter-msg {
    background: linear-gradient(135deg,
        rgba(11, 206, 175, 0.07),
        rgba(11, 206, 175, 0.03)
    );
    border: 1px solid rgba(11, 206, 175, 0.18);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.cv-success-recruiter-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #0bceaf, #09b89b);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 50px;
    margin-bottom: 14px;
}

.cv-success-recruiter-badge .fa {
    font-size: 10px;
}

.cv-success-recruiter-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
    margin: 0 0 18px;
}

.cv-success-recruiter-text strong {
    color: #fff;
    font-weight: 600;
}

/* ── Botones de contacto ── */
.cv-success-recruiter-actions {
    display: flex;
    gap: 10px;
}

.cv-success-contact-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.25s ease;
    border: 2px solid transparent;
}

.cv-contact-email {
    background: transparent;
    color: rgba(255, 255, 255, 0.75) !important;
    border-color: rgba(255, 255, 255, 0.2);
}

.cv-contact-email:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff !important;
    transform: translateY(-2px);
}

.cv-contact-linkedin {
    background: #0077B5;
    color: #fff !important;
    border-color: #0077B5;
}

.cv-contact-linkedin:hover {
    background: #005e8e;
    border-color: #005e8e;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 119, 181, 0.4);
}

/* ── Barra de progreso cierre automático ── */
.cv-success-progress-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.cv-success-progress-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #0bceaf, #09b89b);
    border-radius: 10px;
    transform-origin: left;
    transition: none;
}

.cv-success-progress-fill.animating {
    transition: width linear;
}

.cv-success-close-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    margin: 0;
}

.cv-success-close-hint span {
    color: rgba(11, 206, 175, 0.7);
    font-weight: 600;
}

/* ── Tema claro ── */
.white-vertion .cv-success-container {
    background: rgba(250, 252, 255, 0.98);
    border-color: rgba(11, 206, 175, 0.3);
}

.white-vertion .cv-success-title  { color: #1a1a2e; }
.white-vertion .cv-success-desc   { color: rgba(0,0,0,0.45); }

.white-vertion .cv-success-path {
    background: rgba(11, 206, 175, 0.06);
    border-color: rgba(11, 206, 175, 0.2);
}

.white-vertion .cv-success-path-text { color: rgba(0,0,0,0.65); }

.white-vertion .cv-success-recruiter-msg {
    background: linear-gradient(135deg, rgba(11,206,175,0.06), rgba(11,206,175,0.02));
    border-color: rgba(11, 206, 175, 0.2);
}

.white-vertion .cv-success-recruiter-text { color: rgba(0,0,0,0.65); }
.white-vertion .cv-success-recruiter-text strong { color: #1a1a2e; }

.white-vertion .cv-contact-email {
    color: rgba(0,0,0,0.6) !important;
    border-color: rgba(0,0,0,0.2);
}

.white-vertion .cv-contact-email:hover {
    background: rgba(0,0,0,0.05);
    color: #1a1a2e !important;
}

.white-vertion .cv-success-close-hint { color: rgba(0,0,0,0.3); }

/* ── Responsive ── */
@media (max-width: 480px) {
    .cv-success-container {
        padding: 36px 22px 28px;
        border-radius: 22px;
    }

    .cv-success-title { font-size: 22px; }

    .cv-success-recruiter-actions {
        flex-direction: column;
    }

    .cv-success-path-text {
        font-size: 11px;
    }
}