/* ACS Credit Popup Styles */

/* Popup Overlay */
.acs-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.acs-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Popup Container */
.acs-popup-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.acs-popup-overlay.show .acs-popup-container {
    transform: scale(1) translateY(0);
}

/* Popup Header */
.acs-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0 24px;
    position: relative;
}

.acs-popup-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
    flex: 1;
    padding-right: 20px;
}

.acs-popup-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    color: #6b7280;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.acs-popup-close:hover {
    background: #f3f4f6;
    color: #374151;
    transform: scale(1.05);
}

.acs-popup-close:active {
    transform: scale(0.95);
}

/* Popup Content */
.acs-popup-content {
    padding: 16px 24px 24px 24px;
}

.acs-popup-message {
    font-size: 1rem;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 24px;
    text-align: center;
}

/* Popup Actions */
.acs-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.acs-popup-actions.horizontal {
    flex-direction: row;
    justify-content: center;
}

.acs-popup-actions.horizontal .acs-btn {
    flex: 1;
    max-width: 200px;
}

/* Button Styles */
.acs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 44px;
    position: relative;
    overflow: hidden;
}

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

.acs-btn:hover:before {
    left: 100%;
}

/* Primary Button */
.acs-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(102, 126, 234, 0.4);
}

.acs-btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    box-shadow: 0 6px 20px 0 rgba(102, 126, 234, 0.5);
    transform: translateY(-1px);
}

.acs-btn-primary:active {
    transform: translateY(0);
}

/* Secondary Button */
.acs-btn-secondary {
    background: #f8fafc;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.acs-btn-secondary:hover {
    background: #f1f5f9;
    border-color: #d1d5db;
    color: #1f2937;
    transform: translateY(-1px);
}

.acs-btn-secondary:active {
    transform: translateY(0);
}

/* Tertiary Button */
.acs-btn-tertiary {
    background: transparent;
    color: #6b7280;
    border: 2px solid transparent;
}

.acs-btn-tertiary:hover {
    background: #f9fafb;
    color: #374151;
    transform: translateY(-1px);
}

.acs-btn-tertiary:active {
    transform: translateY(0);
}

/* Icon Styles */
.acs-popup-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 24px;
}

.acs-popup-icon.gift {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
}

.acs-popup-icon.user-plus {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.acs-popup-icon.credit-card {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.acs-popup-icon.shopping-cart {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.acs-popup-icon.exclamation-triangle {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
}

/* Loading State */
.acs-popup-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.acs-popup-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 640px) {
    .acs-popup-overlay {
        padding: 16px;
    }
    
    .acs-popup-container {
        border-radius: 12px;
    }
    
    .acs-popup-header {
        padding: 20px 20px 0 20px;
    }
    
    .acs-popup-title {
        font-size: 1.25rem;
    }
    
    .acs-popup-content {
        padding: 12px 20px 20px 20px;
    }
    
    .acs-popup-actions.horizontal {
        flex-direction: column;
    }
    
    .acs-popup-actions.horizontal .acs-btn {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .acs-popup-container {
        max-width: 100%;
    }
    
    .acs-popup-title {
        font-size: 1.125rem;
    }
    
    .acs-popup-message {
        font-size: 0.95rem;
    }
    
    .acs-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .acs-popup-container {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .acs-popup-title {
        color: #f9fafb;
    }
    
    .acs-popup-message {
        color: #d1d5db;
    }
    
    .acs-popup-close {
        color: #9ca3af;
    }
    
    .acs-popup-close:hover {
        background: #374151;
        color: #f3f4f6;
    }
    
    .acs-btn-secondary {
        background: #374151;
        color: #f3f4f6;
        border-color: #4b5563;
    }
    
    .acs-btn-secondary:hover {
        background: #4b5563;
        border-color: #6b7280;
        color: #f9fafb;
    }
    
    .acs-btn-tertiary {
        color: #9ca3af;
    }
    
    .acs-btn-tertiary:hover {
        background: #374151;
        color: #f3f4f6;
    }
}

/* Animation Classes */
.acs-popup-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.acs-popup-slide-up {
    animation: slideUp 0.3s ease-out;
}

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

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

/* Focus Management */
.acs-popup-overlay:focus-within {
    outline: none;
}

.acs-popup-container:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .acs-popup-overlay,
    .acs-popup-container,
    .acs-btn,
    .acs-popup-close {
        transition: none;
        animation: none;
    }
    
    .acs-btn:before {
        display: none;
    }
} 