/* ===== MODAL ELEGANTE PARA DESCARGAR PGN ===== */
/* Diseño sofisticado y moderno consistente con otros modales */

.pgn-download-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    animation: overlayFadeIn 0.3s ease;
}

.pgn-download-modal-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pgn-download-modal {
    background: linear-gradient(145deg, #1a1a1a 0%, #2a2a2a 50%, #1f1f1f 100%);
    border: 2px solid #C50039;
    border-radius: 20px;
    padding: 35px 40px 30px;
    max-width: 550px;
    width: 90%;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.9),
        0 0 0 1px rgba(197, 0, 57, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

/* Icono decorativo superior */
.pgn-download-modal::before {
    content: "📄";
    display: block;
    font-size: 3rem;
    text-align: center;
    margin-bottom: 15px;
    animation: iconBounce 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(197, 0, 57, 0.3));
}

/* Título del modal */
.pgn-download-modal-title {
    color: #C50039;
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(197, 0, 57, 0.3);
}

/* Subtítulo/descripción */
.pgn-download-modal-subtitle {
    color: #b0b0b0;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    text-align: center;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

/* Línea decorativa */
.pgn-download-modal-divider {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #C50039, transparent);
    margin: 15px auto 25px;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(197, 0, 57, 0.4);
}

/* Formulario */
.pgn-download-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.pgn-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pgn-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Labels */
.pgn-form-label {
    color: #D4AF37;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.pgn-form-label.required::after {
    content: " *";
    color: #C50039;
    font-weight: 700;
}

/* Inputs y Selects */
.pgn-form-input,
.pgn-form-select {
    padding: 12px 15px;
    border: 2px solid rgba(197, 0, 57, 0.3);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(30, 30, 30, 0.5) 100%);
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pgn-form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

.pgn-form-input:focus,
.pgn-form-select:focus {
    outline: none;
    border-color: #C50039;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(40, 40, 40, 0.6) 100%);
    box-shadow: 
        0 0 0 3px rgba(197, 0, 57, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

.pgn-form-input:hover,
.pgn-form-select:hover {
    border-color: rgba(197, 0, 57, 0.5);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.35) 0%, rgba(35, 35, 35, 0.55) 100%);
}

.pgn-form-select {
    cursor: pointer;
    appearance: none;
    background-image: 
        linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(30, 30, 30, 0.5) 100%),
        url('data:image/svg+xml;utf8,<svg fill="%23C50039" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: center, right 8px center;
    background-size: auto, 20px;
    padding-right: 38px;
}

.pgn-form-select option {
    background: #1a1a1a;
    color: #ffffff;
    padding: 12px;
    font-family: 'Poppins', sans-serif;
}

/* Botones del modal */
.pgn-modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

.pgn-modal-button {
    padding: 12px 28px;
    border: 2px solid;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.pgn-modal-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.pgn-modal-button:hover::before {
    left: 100%;
}

/* Botón Cancelar */
.pgn-modal-button.cancel {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    color: #b0b0b0;
    border-color: #555;
    box-shadow: 
        0 4px 10px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.pgn-modal-button.cancel:hover {
    transform: translateY(-2px);
    border-color: #777;
    color: #ffffff;
    box-shadow: 
        0 6px 15px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Botón Descargar */
.pgn-modal-button.download {
    background: linear-gradient(135deg, #C50039 0%, #A00030 100%);
    color: #ffffff;
    border-color: #C50039;
    box-shadow: 
        0 4px 12px rgba(197, 0, 57, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.pgn-modal-button.download:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #E5004A 0%, #C50039 100%);
    box-shadow: 
        0 6px 18px rgba(197, 0, 57, 0.6),
        0 3px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Botón WhatsApp */
.pgn-modal-button.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #1EBE57 100%);
    color: #ffffff;
    border-color: #25D366;
    box-shadow: 
        0 4px 12px rgba(37, 211, 102, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.pgn-modal-button.whatsapp:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #2EE876 0%, #25D366 100%);
    box-shadow: 
        0 6px 18px rgba(37, 211, 102, 0.6),
        0 3px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.pgn-modal-button:active {
    transform: translateY(0);
    transition: all 0.1s ease;
}

.pgn-modal-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Animaciones */
@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-40px) scale(0.9);
    }
    50% {
        opacity: 0.8;
        transform: translateY(5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.05);
    }
}

/* Scrollbar personalizado para el modal */
.pgn-download-modal::-webkit-scrollbar {
    width: 8px;
}

.pgn-download-modal::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.pgn-download-modal::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #C50039 0%, #A00030 100%);
    border-radius: 10px;
    box-shadow: 0 0 6px rgba(197, 0, 57, 0.5);
}

.pgn-download-modal::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #E5004A 0%, #C50039 100%);
}

/* Responsive para móviles */
@media only screen and (max-width: 767px) {
    .pgn-download-modal {
        padding: 12px 10px 10px;
        max-width: 96%;
        max-height: 80vh;
        border-radius: 10px;
        border-width: 1px;
    }
    
    .pgn-download-modal::before {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }
    
    .pgn-download-modal-title {
        font-size: 0.9rem;
        letter-spacing: 0.8px;
        margin-bottom: 3px;
    }
    
    .pgn-download-modal-subtitle {
        font-size: 0.7rem;
        margin-bottom: 6px;
        line-height: 1.2;
    }
    
    .pgn-download-modal-divider {
        width: 50px;
        height: 1px;
        margin: 5px auto 8px;
    }
    
    .pgn-download-form {
        gap: 8px;
    }
    
    .pgn-form-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .pgn-form-group {
        gap: 4px;
    }
    
    .pgn-form-label {
        font-size: 0.65rem;
        margin-bottom: 0;
    }
    
    .pgn-form-input,
    .pgn-form-select {
        padding: 7px 8px;
        font-size: 0.8rem;
        border-radius: 6px;
    }
    
    .pgn-modal-buttons {
        flex-direction: column;
        gap: 6px;
        margin-top: 10px;
    }
    
    .pgn-modal-button {
        width: 100%;
        padding: 9px 12px;
        font-size: 0.75rem;
        border-radius: 8px;
        letter-spacing: 0.3px;
    }
}

/* Para pantallas muy pequeñas */
@media only screen and (max-width: 480px) {
    .pgn-download-modal {
        padding: 10px 8px 8px;
        max-width: 97%;
        max-height: 82vh;
        border-radius: 8px;
    }
    
    .pgn-download-modal::before {
        font-size: 1.3rem;
        margin-bottom: 4px;
    }
    
    .pgn-download-modal-title {
        font-size: 0.85rem;
        letter-spacing: 0.5px;
        margin-bottom: 2px;
    }
    
    .pgn-download-modal-subtitle {
        font-size: 0.65rem;
        margin-bottom: 5px;
        line-height: 1.2;
    }
    
    .pgn-download-modal-divider {
        width: 40px;
        height: 1px;
        margin: 4px auto 6px;
    }
    
    .pgn-download-form {
        gap: 6px;
    }
    
    .pgn-form-group {
        gap: 3px;
    }
    
    .pgn-form-label {
        font-size: 0.6rem;
    }
    
    .pgn-form-input,
    .pgn-form-select {
        padding: 6px 7px;
        font-size: 0.75rem;
        border-radius: 5px;
    }
    
    .pgn-modal-buttons {
        gap: 5px;
        margin-top: 8px;
    }
    
    .pgn-modal-button {
        padding: 8px 10px;
        font-size: 0.7rem;
        letter-spacing: 0.3px;
        border-radius: 6px;
    }
}

