/* Popup Styles for Public Pages */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.popup-box {
    background: #fff;
    width: 90%;
    max-width: 450px;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    position: relative;
    animation: scaleIn 0.25s ease-out;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: #dc3545;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    visibility: visible !important;
    padding: 0;
    line-height: 1;
}

.popup-close:hover {
    background: #c82333;
    color: #fff;
    transform: scale(1.1);
}

.popup-icon {
    font-size: 56px;
    margin-bottom: 15px;
}

/* Success popup with centered vertical layout */
.popup-box.success-popup {
    text-align: center;
}

.popup-box.success-popup .popup-content-wrapper {
    text-align: center;
}

.popup-box.success-popup .popup-icon {
    margin-bottom: 20px;
    text-align: center;
}

.popup-box.success-popup .popup-title {
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
    text-align: center;
}

.popup-box.success-popup .popup-title .received-badge {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 4px;
}

.popup-box.success-popup .popup-text {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    text-align: center;
}

.popup-icon-success {
    color: #28a745;
}

.popup-icon-warning {
    color: #ffc107;
}

.popup-icon-error {
    color: #dc3545;
}

.popup-icon-info {
    color: #0d6efd;
}

.popup-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.popup-text {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.popup-text strong {
    color: #333;
}

.popup-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.popup-actions .btn {
    min-width: 120px;
    border-radius: 50px !important;
    background-color: #ff8c5a;
    border: 1px solid white;
}

.popup-close-bottom {
    margin-top: 20px;
    padding: 10px 30px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
}

.popup-close-bottom:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

/* Ensure popup can be closed by clicking outside */
.popup-overlay {
    cursor: pointer;
}

.popup-overlay .popup-box {
    cursor: default;
}

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

@keyframes scaleIn {
    from { 
        transform: scale(0.9); 
        opacity: 0; 
    }
    to { 
        transform: scale(1); 
        opacity: 1; 
    }
}

/* Loading Spinner */
.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #FFA07A;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress Bar Container */
.popup-progress-container {
    width: 100%;
    background: #f0f0f0;
    border-radius: 10px;
    height: 30px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
    display: none;
}

.popup-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FFA07A, #ff8c5a);
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    box-shadow: 0 2px 5px rgba(255, 160, 122, 0.3);
}

.popup-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.popup-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    font-size: 14px;
    color: #333;
    z-index: 1;
}


