/**
 * Cooking Viral - Custom CSS
 * Add your custom styles here
 *
 * @package Cooking_Viral
 */

/* ============================================
   Custom Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.animate-in {
    animation: fadeInUp 0.5s ease forwards;
}

/* ============================================
   Team Member Styles
   ============================================ */
.cv-team-member {
    padding: var(--cv-spacing-lg);
}

.cv-team-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--cv-spacing-md);
    border-radius: var(--cv-radius-full);
    overflow: hidden;
    box-shadow: var(--cv-shadow);
}

.cv-team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cv-team-member h3 {
    margin-bottom: var(--cv-spacing-xs);
}

/* ============================================
   Filter Styles
   ============================================ */
.cv-filters {
    padding: var(--cv-spacing-md) 0;
}

.cv-filter-label {
    font-weight: 600;
    margin-right: var(--cv-spacing-sm);
    color: var(--cv-text-secondary);
}

.cv-filter-categories {
    display: flex;
    flex-wrap: wrap;
    gap: var(--cv-spacing-sm);
    align-items: center;
}

.cv-filter-btn {
    display: inline-flex;
    padding: var(--cv-spacing-xs) var(--cv-spacing-md);
    background: var(--cv-bg-primary);
    border: 2px solid var(--cv-border);
    border-radius: var(--cv-radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--cv-text-primary);
    transition: var(--cv-transition-fast);
    text-decoration: none;
}

.cv-filter-btn:hover {
    border-color: var(--cv-primary);
    color: var(--cv-primary);
}

.cv-filter-btn.active {
    background: var(--cv-primary);
    border-color: var(--cv-primary);
    color: var(--cv-text-white);
}

.cv-filter-sort select {
    padding: var(--cv-spacing-xs) var(--cv-spacing-md);
    border: 2px solid var(--cv-border);
    border-radius: var(--cv-radius);
    background: var(--cv-bg-primary);
    font-size: 0.875rem;
}

/* ============================================
   Section Header
   ============================================ */
.cv-section-header {
    margin-bottom: var(--cv-spacing-2xl);
}

.cv-section-header h2 {
    margin-bottom: var(--cv-spacing-sm);
}

.cv-section-header p {
    color: var(--cv-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   Recipe Info List
   ============================================ */
.cv-info-list {
    display: flex;
    flex-direction: column;
    gap: var(--cv-spacing-md);
}

.cv-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--cv-spacing-sm);
    border-bottom: 1px solid var(--cv-border);
}

.cv-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cv-info-label {
    font-weight: 500;
    color: var(--cv-text-secondary);
}

.cv-info-value {
    font-weight: 600;
}

/* ============================================
   Nutrition Grid
   ============================================ */
.cv-nutrition-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--cv-spacing-md);
    margin-top: var(--cv-spacing-md);
}

.cv-nutrition-item {
    text-align: center;
    padding: var(--cv-spacing-md);
    background: var(--cv-bg-secondary);
    border-radius: var(--cv-radius);
}

.cv-nutrition-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cv-primary);
}

.cv-nutrition-label {
    display: block;
    font-size: 0.875rem;
    color: var(--cv-text-secondary);
    margin-top: var(--cv-spacing-xs);
}

/* ============================================
   Video Container
   ============================================ */
.cv-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--cv-radius-lg);
}

.cv-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================================
   Share Buttons
   ============================================ */
.cv-share-buttons {
    display: flex;
    gap: var(--cv-spacing-sm);
}

.cv-share-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--cv-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cv-text-white);
    transition: var(--cv-transition-fast);
    text-decoration: none;
}

.cv-share-btn:hover {
    transform: translateY(-2px);
    color: var(--cv-text-white);
}

.cv-share-facebook { background: #1877f2; }
.cv-share-twitter { background: #1da1f2; }
.cv-share-pinterest { background: #e60023; }
.cv-share-email { background: var(--cv-secondary); }

/* ============================================
   Photo Search Steps
   ============================================ */
.cv-photo-step {
    display: flex;
    gap: var(--cv-spacing-lg);
    margin-bottom: var(--cv-spacing-xl);
}

.cv-photo-step:last-child {
    margin-bottom: 0;
}

.cv-photo-step-icon {
    width: 56px;
    height: 56px;
    background: var(--cv-primary);
    color: var(--cv-text-white);
    border-radius: var(--cv-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cv-photo-step-content h4 {
    margin-bottom: var(--cv-spacing-xs);
}

.cv-photo-step-content p {
    margin: 0;
    color: var(--cv-text-secondary);
}

/* ============================================
   AI Features
   ============================================ */
.cv-ai-features {
    margin-top: var(--cv-spacing-xl);
}

.cv-ai-feature {
    display: flex;
    align-items: center;
    gap: var(--cv-spacing-md);
    padding: var(--cv-spacing-md) 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.cv-ai-feature:last-child {
    border-bottom: none;
}

.cv-ai-feature i {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--cv-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* ============================================
   Category Icon
   ============================================ */
.cv-category-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--cv-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--cv-spacing-md);
}

.cv-category-icon i {
    font-size: 1.5rem;
    color: var(--cv-text-white);
}

/* ============================================
   Recipe Card Hover Effect
   ============================================ */
.cv-recipe-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cv-recipe-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* ============================================
   Message Time
   ============================================ */
.cv-ai-message-time {
    display: block;
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: var(--cv-spacing-xs);
}

/* ============================================
   Typing Indicator
   ============================================ */
.cv-ai-typing-dots {
    display: flex;
    gap: 4px;
    padding: var(--cv-spacing-sm);
}

.cv-ai-typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--cv-text-secondary);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.cv-ai-typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.cv-ai-typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   Recipe Schema Hidden
   ============================================ */
.cv-recipe-schema {
    display: none;
}

/* ============================================
   Additional Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .cv-nutrition-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cv-photo-step {
        flex-direction: column;
        text-align: center;
    }

    .cv-photo-step-icon {
        margin: 0 auto;
    }

    .cv-share-buttons {
        justify-content: center;
    }

    .cv-filters {
        flex-direction: column;
        gap: var(--cv-spacing-md);
    }

    .cv-filter-categories {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .cv-nutrition-grid {
        grid-template-columns: 1fr 1fr;
    }

    .cv-info-list {
        gap: var(--cv-spacing-sm);
    }
}

/* ============================================
   Print Styles Enhancement
   ============================================ */
@media print {
    .cv-header,
    .cv-footer,
    .cv-add-to-list,
    .cv-shopping-modal,
    .cv-share-buttons,
    .cv-recipe-actions,
    .cv-comments {
        display: none !important;
    }

    .cv-recipe-content {
        display: block;
    }

    .cv-recipe-sidebar {
        position: static;
        margin-top: 2rem;
    }

    .cv-recipe-card-box {
        break-inside: avoid;
    }

    .cv-recipe-instructions {
        break-inside: avoid;
    }
}

/* ============================================
   Accessibility Enhancements
   ============================================ */
.cv-btn:focus-visible,
.cv-nav-link:focus-visible,
.cv-recipe-card:focus-within {
    outline: 2px solid var(--cv-primary);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .cv-recipe-card {
        border: 2px solid var(--cv-text-primary);
    }

    .cv-filter-btn {
        border-width: 3px;
    }
}

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

    .cv-recipe-card:hover {
        transform: none;
    }
}
