/* ==========================================================================
   SUCCESS MODAL STYLES
   ========================================================================== */

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in;
}

/* Modal Content */
.modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease-out;
    position: relative;
}

/* Modal Elements */
.modal-icon {
    margin-bottom: 20px;
    animation: bounceIn 0.6s ease-out;
}

.modal-title {
    color: #28a745;
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.modal-message {
    color: #333;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.modal-redirect {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

#countdown {
    color: #28a745;
    font-weight: 600;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* ==========================================================================
   PORTFOLIO MODAL CLOSE BUTTON STYLES
   ========================================================================== */

/* Close Button Base Styles */
.cerrar_button {
    background-color : rgba(0, 0, 0, 0.3);
    font-size        : var(--text-xs);
    color            : white !important;
    padding          : 1.2rem;
    position         : absolute;
    text-decoration  : none !important;
    border-radius    : 50%;
    font-weight      : 600;
    text-transform   : uppercase;
    letter-spacing   : 0.5px;
    transition       : all 0.3s ease;
    border           : none;
    cursor           : pointer;
    text-align       : center;
    z-index          : 10;
}

.cerrar_button:hover,
.cerrar_button:focus {
    background-color : var(--color-gray-19);
    color            : white;
}

.cerrar_button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* Top Close Button (positioned absolutely) */
.modal-popup .cerrar_button:first-child {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px;
    font-size: 12px;
    z-index: 10;
    margin: 0;
}

/* Bottom Close Button */
.modal-close-bottom {
    position         : absolute;
    display          : block;
    text-align       : center;
}

/* Modal Popup Adjustments */
.modal-popup {
    position: relative;
    padding-top: 60px; /* Space for top close button */
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 600px) {
    .modal-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .modal-title {
        font-size: 1.8rem;
    }
    
    .modal-message {
        font-size: 1rem;
    }

    /* Portfolio Modal Responsive */
    .modal-popup .cerrar_button:first-child {
        top: 10px;
        right: 10px;
        padding: 12px;
        font-size: 11px;
    }
    
    .cerrar_button {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .modal-close-bottom {
        max-width: 150px;
    }
}
