/* ShopGlut Mega Menu Styles */

/* Admin Interface Styles */
.shopglut-mega-menu-admin {
    max-width: 1200px;
    margin: 20px 0;
}

.mega-menu-card {
    transition: all 0.3s ease;
}

.mega-menu-card:hover {
    border-color: #0073aa !important;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.1);
}

.category-item {
    transition: all 0.2s ease;
}

.category-item:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.category-checkbox:checked + span {
    font-weight: 600;
    color: #0073aa;
}

/* Modal Styles */
.shopglut-modal {
    animation: fadeIn 0.3s ease;
}

.shopglut-modal .modal-content {
    animation: slideIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Frontend Mega Menu Styles */
.shopglut-mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 600px;
}

.nav-menu-item:hover .shopglut-mega-menu,
.nav-menu-item.mega-menu-active .shopglut-mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-category h4 a:hover {
    color: #0073aa !important;
    text-decoration: underline;
}

.mega-menu-category ul li a:hover {
    opacity: 1 !important;
    color: #0073aa !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .shopglut-mega-menu {
        position: relative;
        width: 100% !important;
        min-width: auto;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-radius: 0;
    }
    
    .mega-menu-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .mega-menus-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Loading States */
.mega-menu-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.mega-menu-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Elements */
.mega-menu-editor-form .widefat {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    transition: border-color 0.2s ease;
}

.mega-menu-editor-form .widefat:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

/* Button Styles */
.button.button-large {
    padding: 12px 24px;
    font-size: 14px;
    line-height: 1.4;
}

.button.button-secondary:hover {
    background: #f0f0f1;
    border-color: #0073aa;
}

/* Category Image Styling */
.category-image img {
    width: 100%;
    height: 60px;
    object-fit: cover;
}

/* Success/Error Messages */
.mega-menu-message {
    padding: 10px 15px;
    border-radius: 4px;
    margin: 15px 0;
    animation: slideDown 0.3s ease;
}

.mega-menu-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.mega-menu-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}