/**
 * Jumis Sync Cart Restrictions Modal Styles
 */

.jumis-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
}

.jumis-modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: jumisModalSlideIn 0.3s ease-out;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

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

.jumis-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.jumis-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.jumis-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.jumis-modal-close:hover {
    background-color: #f0f0f0;
    color: #666;
}

.jumis-modal-body {
    padding: 24px;
}

.jumis-modal-body p {
    margin: 0 0 16px;
    font-size: 16px;
    line-height: 1.5;
    color: #555;
}

.jumis-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f8f9fa;
}

.jumis-modal-loading {
    padding: 24px;
    text-align: center;
}

.jumis-modal-loading p {
    margin: 0;
    font-style: italic;
    color: #666;
}

/* Button Styles */
.jumis-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.2s ease;
    min-width: 100px;
}

.jumis-btn-primary {
    background-color: #0073aa;
    color: #fff;
}

.jumis-btn-primary:hover {
    background-color: #005a87;
    color: #fff;
}

.jumis-btn-secondary {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.jumis-btn-secondary:hover {
    background-color: #e0e0e0;
    color: #333;
}

/* Error Styles */
.jumis-modal-error {
    margin-top: 12px;
    padding: 10px;
    background-color: #ffeaea;
    border: 1px solid #ffcccc;
    border-radius: 4px;
    color: #dc3232;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 600px) {
    .jumis-modal-content {
        width: 95%;
/*         margin: 20px; */
    }
    
    .jumis-modal-header,
    .jumis-modal-body,
    .jumis-modal-footer {
        padding: 16px;
    }
    
    .jumis-modal-footer {
        flex-direction: column;
    }
    
    .jumis-btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .jumis-btn:last-child {
        margin-bottom: 0;
    }
}

/* Loading Animation */
/*
.jumis-modal-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: jumisSpinner 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}
*/

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

/* WooCommerce Notice Styles Integration */
.woocommerce .jumis-modal-content,
.woocommerce-page .jumis-modal-content {
    font-family: inherit;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .jumis-modal-overlay {
        background-color: rgba(0, 0, 0, 0.8);
    }
    
    .jumis-modal-content {
        border: 2px solid #333;
    }
    
    .jumis-btn-primary {
        border: 2px solid #000;
    }
    
    .jumis-btn-secondary {
        border: 2px solid #333;
    }
}

/* Success Notification Styles */
.jumis-success-notice {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000000;
    display: none;
}

.jumis-success-content {
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.jumis-success-icon {
    font-size: 16px;
    font-weight: bold;
}

/* Loading Spinner */
.jumis-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: jumisSpinner 1s linear infinite;
    margin: 0 auto 10px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .jumis-modal-content {
        animation: none;
    }
    
    .jumis-btn,
    .jumis-modal-close {
        transition: none;
    }
    
    .jumis-loading-spinner {
        animation: none;
        border-top-color: #0073aa;
    }
}