/**
 * CookingViral Additional Styles
 *
 * @package CookingViral
 * @version 1.0.0
 */

/* Additional CSS utilities and overrides */

/* Recipe card hover animations */
.recipe-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* AI Chat enhancements */
.ai-chat-messages {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.ai-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.ai-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* Photo upload dropzone active state */
.dropzone.dragover {
    border-color: var(--primary-color);
    background: rgba(255, 107, 53, 0.05);
}

/* Print styles for recipes */
@media print {
    .site-header,
    .site-footer,
    .shopping-list-btn,
    .recipe-detail-actions,
    .ai-assistant-section {
        display: none !important;
    }

    .recipe-detail-grid {
        display: block !important;
    }

    .recipe-sidebar {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .recipe-ingredients li {
        break-inside: avoid;
    }

    .recipe-instruction-step {
        break-inside: avoid;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .hero-search {
        flex-direction: column;
    }

    .hero-search button {
        width: 100%;
    }

    .recipe-detail-meta {
        gap: 1rem;
    }

    .recipe-detail-grid {
        display: block;
    }

    .featured-recipe-card {
        display: block;
    }

    .featured-recipe-image {
        min-height: 250px;
    }

    .ai-chat-messages {
        height: 250px;
    }

    .shopping-list-btn {
        width: 50px;
        height: 50px;
        bottom: 1rem;
        right: 1rem;
    }
}

/* Tablet responsive */
@media (min-width: 641px) and (max-width: 768px) {
    .recipe-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Loading animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 100px;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--secondary-color);
    color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Ingredient tag styling */
.ingredient-tag {
    background: var(--background-light);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.25rem;
}

/* Shortcode container styling */
.ai-chat-shortcode,
.photo-upload-shortcode {
    max-width: 600px;
    margin: 2rem auto;
}

/* Widget styling */
.widget {
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* WooCommerce integration (if needed) */
.woocommerce ul.products li.product {
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.woocommerce ul.products li.product a img {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* Gutenberg block overrides */
.wp-block-button__link {
    border-radius: var(--radius-md);
}

.wp-block-quote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    font-style: italic;
}

/* Accessibility improvements */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
        --text-secondary: #000;
    }

    .recipe-card {
        border: 2px solid #000;
    }

    .btn {
        border: 2px solid currentColor;
    }
}
