/**
 * Success Popup Modal Styles
 * Mobile-friendly, SEO-friendly, and accessible
 */

/* Success Popup Container */
.success-popup-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.success-popup-modal.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

/* Backdrop */
.success-popup-modal .popup-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
    cursor: pointer;
}

/* Popup Content */
.success-popup-modal .popup-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10000;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    padding: 0;
}

.success-popup-modal.active .popup-content {
    transform: scale(1);
}

/* Close Button */
.success-popup-modal .popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: transparent;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    padding: 0;
    line-height: 1;
}

.success-popup-modal .popup-close:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
    transform: rotate(90deg);
}

.success-popup-modal .popup-close:focus {
    outline: 2px solid var(--theme-color, #007bff);
    outline-offset: 2px;
}

.success-popup-modal .popup-close span {
    font-size: 24px;
    color: #666;
    line-height: 1;
    font-weight: 300;
}

.success-popup-modal .popup-close:hover span {
    color: #333;
}

/* Popup Body */
.success-popup-modal .popup-body {
    padding: 40px 30px 30px;
    text-align: center;
}

/* Popup Logo */
.success-popup-modal .popup-logo {
    margin-bottom: 20px;
    text-align: center;
    animation: fadeInDown 0.5s ease;
}

.success-popup-modal .popup-logo img {
    max-width: 180px;
    height: auto;
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success Icon */
.success-popup-modal .success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPulse 0.6s ease;
}

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

.success-popup-modal .success-icon i {
    font-size: 40px;
    color: #ffffff;
}

/* Success Title */
.success-popup-modal .success-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
}

/* Success Message */
.success-popup-modal .success-message {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Action Buttons */
.success-popup-modal .popup-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.success-popup-modal .popup-btn {
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.success-popup-modal .popup-btn-primary {
    background: var(--theme-color, #007bff);
    color: #ffffff;
    border: 2px solid var(--theme-color, #007bff);
}

.success-popup-modal .popup-btn-primary:hover,
.success-popup-modal .popup-btn-primary:focus {
    background: var(--theme-color-dark, #0056b3);
    border-color: var(--theme-color-dark, #0056b3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.success-popup-modal .popup-btn-primary:active {
    transform: translateY(0);
}

.success-popup-modal .popup-btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e0e0e0;
}

.success-popup-modal .popup-btn-secondary:hover {
    background: #e9ecef;
    border-color: #d0d0d0;
}

.success-popup-modal .popup-btn:focus {
    outline: 2px solid var(--theme-color, #007bff);
    outline-offset: 2px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .success-popup-modal .popup-content {
        width: 95%;
        max-width: 95%;
        border-radius: 12px;
        margin: 20px 10px;
        max-height: 85vh;
    }

    .success-popup-modal .popup-body {
        padding: 30px 20px 25px;
    }

    .success-popup-modal .popup-logo {
        margin-bottom: 15px;
    }

    .success-popup-modal .popup-logo img {
        max-width: 140px;
        height: auto;
    }

    .success-popup-modal .success-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }

    .success-popup-modal .success-icon i {
        font-size: 35px;
    }

    .success-popup-modal .success-title {
        font-size: 22px;
        margin-bottom: 12px;
        line-height: 1.3;
    }

    .success-popup-modal .success-message {
        font-size: 15px;
        margin-bottom: 20px;
        line-height: 1.6;
        padding: 0 5px;
    }

    .success-popup-modal .popup-actions {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .success-popup-modal .popup-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
        min-width: auto;
    }

    .success-popup-modal .popup-close {
        width: 32px;
        height: 32px;
        top: 10px;
        right: 10px;
        border-width: 1px;
    }

    .success-popup-modal .popup-close span {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .success-popup-modal .popup-content {
        width: 98%;
        max-width: 98%;
        margin: 10px 5px;
        border-radius: 10px;
    }

    .success-popup-modal .popup-body {
        padding: 25px 15px 20px;
    }

    .success-popup-modal .popup-logo {
        margin-bottom: 12px;
    }

    .success-popup-modal .popup-logo img {
        max-width: 120px;
    }

    .success-popup-modal .success-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }

    .success-popup-modal .success-icon i {
        font-size: 30px;
    }

    .success-popup-modal .success-title {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .success-popup-modal .success-message {
        font-size: 14px;
        margin-bottom: 18px;
        padding: 0;
    }

    .success-popup-modal .popup-btn {
        padding: 12px 18px;
        font-size: 14px;
    }

    .success-popup-modal .popup-close {
        width: 30px;
        height: 30px;
        top: 8px;
        right: 8px;
    }

    .success-popup-modal .popup-close span {
        font-size: 18px;
    }
}

/* Accessibility - Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Prevent body scroll when popup is open */
body.popup-open {
    overflow: hidden;
}

/* Animation for popup appearance */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.success-popup-modal.active .popup-content {
    animation: fadeIn 0.3s ease;
}

