/**
 * Food Detail Components CSS
 * Spoločné štýly pre food-detail.php a modal v index.php
 */

/* Food Detail Header */
.food-detail-header {
    text-align: center;
    margin-bottom: 0px;
    padding: 100px 20px 40px 20px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    border-radius: 15px 15px 0px 0px;
    color: white;
    overflow: hidden;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.food-detail-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.food-detail-header * {
    position: relative;
    z-index: 2;
}

/* Share icons v pravom hornom rohu */
.share-icons-corner {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
    z-index: 10;
}

.share-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.share-icon-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.food-title-glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.food-title-glass h1 {
    color: white;
    margin: 0 0 10px 0;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.food-price-corner {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 12px 20px;
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    z-index: 3;
}

/* Restaurant Info Section - Fialová sekcia */
.food-description-centered {
    text-align: center;
    margin: 0px;
    max-width: 1200px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0px 0px 15px 15px;
    border-left: 4px solid #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.food-description-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.food-description-icon svg {
    color: white;
}

.restaurant-name-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.restaurant-name-link {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.restaurant-name-link:hover {
    opacity: 0.8;
}

/* Biela sekcia pod fialovou */
.food-info-below-restaurant {
    background: white;
    padding: 30px;
    margin: 0;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.food-description-below {
    font-size: 1rem;
    line-height: 1.7;
    color: #4a5568;
    margin-bottom: 20px;
    text-align: center;
}

.food-tags-below {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.food-tag-below {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 2px solid;
    transition: transform 0.2s ease;
}

.food-tag-below:hover {
    transform: translateY(-2px);
}

.food-tag-below.vegan {
    background: rgba(34, 197, 94, 0.1);
    color: #059669;
    border-color: #059669;
}

.food-tag-below.vegetarian {
    background: rgba(34, 197, 94, 0.08);
    color: #059669;
    border-color: #10b981;
}

.food-tag-below.spicy {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-color: #dc2626;
}

.food-tag-below.gluten-free {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-color: #d97706;
}

/* Allergens & Nutrition Container */
.allergens-nutrition-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 40px 0;
}

@media (max-width: 768px) {
    .allergens-nutrition-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .food-description-centered {
        flex-direction: column;
        text-align: center;
    }
}

/* Allergens Section - Kompaktný dizajn */
.allergens-section {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.1);
    border: 2px solid rgba(220, 53, 69, 0.1);
}

.allergens-section h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #dc3545;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.allergens-content {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.allergen-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    border: 2px solid #dc3545;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #dc3545;
    transition: all 0.2s ease;
    cursor: default;
}

.allergen-tag:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

.allergen-number {
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    flex-shrink: 0;
}

.allergen-tag:hover .allergen-number {
    background: white;
    color: #dc3545;
}

.allergen-icon {
    font-size: 1rem;
}

/* Nutrition Section - Moderný card dizajn */
.nutrition-section {
    background: linear-gradient(135deg, #f0fff4 0%, #dcfce7 100%);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.1);
    border: 2px solid rgba(40, 167, 69, 0.1);
}

.nutrition-section h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #28a745;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.nutrition-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: white;
    border-radius: 12px;
    border: 2px solid rgba(40, 167, 69, 0.2);
    text-align: center;
    transition: all 0.2s ease;
}

.nutrition-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.15);
    border-color: #28a745;
}

.nutrition-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nutrition-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #28a745;
}

@media (max-width: 768px) {
    .nutrition-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .nutrition-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .nutrition-item {
        padding: 12px 8px;
    }
    
    .nutrition-value {
        font-size: 1rem;
    }
}

/* Modal max width */
.food-detail-modal-full {
    max-width: 900px !important;
    margin: 0 auto;
}

/* Similar Foods Component */
.similar-foods-section {
    background: #f8f9fa;
    padding: 30px 20px;
    margin: 30px -20px -20px -20px;
    border-radius: 0 0 15px 15px;
}

.similar-foods-section h3 {
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.similar-foods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.similar-food-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
}

.similar-food-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.similar-food-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.similar-food-info {
    padding: 12px;
}

.similar-food-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.similar-food-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #667eea;
}

.similar-foods-loading {
    text-align: center;
    padding: 30px;
    color: #6b7280;
    font-style: italic;
}

@media (max-width: 768px) {
    .similar-foods-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .similar-foods-section {
        padding: 20px 15px;
    }
    
    .similar-foods-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .similar-food-image {
        height: 120px;
    }
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding: 25px 0 10px 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 30px;
}

.modal-actions .btn {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.modal-actions .btn-secondary {
    background: #f3f4f6;
    color: #4b5563;
    border: 2px solid #e5e7eb;
}

.modal-actions .btn-secondary:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.modal-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.modal-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

@media (max-width: 480px) {
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}
