/* Compare Modal Styles - Fullscreen Modal */

.compare-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.85) !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.compare-modal-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
}

.compare-modal-container {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    background-color: #fff !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.compare-modal-overlay.active .compare-modal-container {
    transform: scale(1);
}

/* Modal Header */
.compare-modal-header {
    position: sticky;
    top: 0;
    background-color: #fff;
    border-bottom: 1px solid #e5e7eb;
    z-index: 100;
    padding: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.compare-modal-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.compare-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.compare-modal-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.compare-modal-close:hover {
    transform: rotate(90deg);
    opacity: 0.8;
    background-color: #f3f4f6;
}

.compare-modal-close:active {
    transform: rotate(90deg) scale(0.95);
}

/* Modal Content */
.compare-modal-content {
    flex: 1 !important;
    padding: 2rem 0 !important;
    min-height: calc(100vh - 100px) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Loading State */
.compare-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 1rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f4f6;
    border-top-color: #ef4444;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.compare-modal-loading p {
    color: #6b7280;
    font-size: 1rem;
    margin: 0;
}

/* Error State */
.compare-modal-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
}

.compare-modal-error p {
    color: #ef4444;
    font-size: 1.1rem;
    margin: 0;
}

.btn-retry {
    background-color: #ef4444;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.btn-retry:hover {
    background-color: #dc2626;
}

/* Responsive Design */
@media (max-width: 768px) {
    .compare-modal-header {
        padding: 1rem 0;
    }
    
    .compare-modal-title {
        font-size: 1.25rem;
    }
    
    .compare-modal-close {
        width: 36px;
        height: 36px;
    }
    
    .compare-modal-content {
        padding: 1rem 0;
    }
    
    .compare-modal-loading,
    .compare-modal-error {
        min-height: 300px;
    }
}

/* Ensure compare content styles are applied */
.compare-modal-content .sec-compare-products,
.compare-modal-content .sec-compare-knowledge {
    padding: 0;
}

.compare-modal-content .sec-bg-color {
    background-color: #fff;
    padding: 0;
}

