/* WooCommerce Modern Modals CSS */
:root {
    --wcm-primary-color: #667eea;
    --wcm-success-color: #10b981;
    --wcm-error-color: #ef4444;
    --wcm-warning-color: #f59e0b;
    --wcm-info-color: #3b82f6;
    --wcm-border-radius: 24px;
    --wcm-animation-speed: 300ms;
    --wcm-backdrop-blur: blur(8px);
    --wcm-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wcm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: var(--wcm-backdrop-blur);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--wcm-animation-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

.wcm-modal-overlay.wcm-active {
    opacity: 1;
    visibility: visible;
}

.wcm-modal-container {
    background: white;
    border-radius: var(--wcm-border-radius);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.8) translateY(40px);
    transition: all var(--wcm-animation-speed) cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-family: var(--wcm-font-family);
}

.wcm-modal-overlay.wcm-active .wcm-modal-container {
    transform: scale(1) translateY(0);
}

.wcm-modal-header {
    padding: 32px 32px 0 32px;
    text-align: center;
}

.wcm-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    position: relative;
    animation: wcm-pulse 2s infinite;
}

.wcm-modal-icon::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.1;
}

.wcm-modal-icon.wcm-success { color: var(--wcm-success-color); }
.wcm-modal-icon.wcm-error { color: var(--wcm-error-color); }
.wcm-modal-icon.wcm-warning { color: var(--wcm-warning-color); }
.wcm-modal-icon.wcm-info { color: var(--wcm-info-color); }

.wcm-modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.wcm-modal-message {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 32px;
}

.wcm-modal-actions {
    padding: 0 32px 32px 32px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.wcm-modal-btn {
    padding: 12px 32px;
    border-radius: calc(var(--wcm-border-radius) / 2);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 120px;
    font-family: inherit;
}

.wcm-modal-btn.wcm-primary {
    background: linear-gradient(135deg, var(--wcm-primary-color) 0%, #764ba2 100%);
    color: white;
}

.wcm-modal-btn.wcm-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.wcm-modal-btn.wcm-secondary {
    background: #f3f4f6;
    color: #6b7280;
}

.wcm-modal-btn.wcm-secondary:hover {
    background: #e5e7eb;
}

.wcm-modal-btn.wcm-danger {
    background: linear-gradient(135deg, var(--wcm-error-color) 0%, #dc2626 100%);
    color: white;
}

.wcm-modal-btn.wcm-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.3);
}

.wcm-modal-btn.wcm-success {
    background: linear-gradient(135deg, var(--wcm-success-color) 0%, #059669 100%);
    color: white;
}

.wcm-modal-btn.wcm-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.wcm-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #9ca3af;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.wcm-modal-close:hover {
    background: #f3f4f6;
    color: #6b7280;
}

/* Hide default WooCommerce notices */
.wcm-hide-default .woocommerce-message,
.wcm-hide-default .woocommerce-error,
.wcm-hide-default .woocommerce-info,
.wcm-hide-default .woocommerce-notice {
    display: none !important;
}

@keyframes wcm-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Add-to-cart button loading state */
.wcm-adding {
    position: relative;
    opacity: 0.8;
    pointer-events: none;
}

.wcm-btn-loading {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wcm-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}

@keyframes wcm-spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 640px) {
    .wcm-modal-container {
        width: 95vw;
        border-radius: calc(var(--wcm-border-radius) - 4px);
    }
    
    .wcm-modal-header {
        padding: 24px 24px 0 24px;
    }
    
    .wcm-modal-actions {
        padding: 0 24px 24px 24px;
        flex-direction: column;
    }
    
    .wcm-modal-btn {
        width: 100%;
        min-width: auto;
    }
}