/**
 * Menu Card Expandable Styles
 * Compact design with smooth expand/collapse animations
 */

/* ======================
   COMPACT MENU CARD BASE
   ====================== */

.menu-item.compact {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .menu-item.compact {
        min-height: 320px;
        border-radius: 14px;
    }
}

@media (min-width: 1440px) {
    .menu-item.compact {
        min-height: 340px;
    }
}

.menu-item.compact:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}


/* ======================
   IMAGE SECTION
   ====================== */

.menu-item.compact .menu-item-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

@media (min-width: 1024px) {
    .menu-item.compact .menu-item-image {
        height: 220px;
    }
}

@media (min-width: 1440px) {
    .menu-item.compact .menu-item-image {
        height: 240px;
    }
}

.menu-item.compact .menu-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}
/* Gradient overlay at bottom of image, from transparent to button color */
/* removed image-gradient overlay */

/* Price overlay above button, on image */
/* price overlay removed */

.menu-item.compact .placeholder-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    opacity: 0.6;
}

/* ======================
   BADGES (COMPACT)
   ====================== */

.menu-item.compact .menu-item-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    z-index: 2;
}

.menu-item.compact .badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.menu-item.compact .badge.popular {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
}

.menu-item.compact .badge.new {
    background: linear-gradient(135deg, #51cf66, #40c057);
}

.menu-item.compact .badge.chef-special {
    background: linear-gradient(135deg, #9775fa, #845ef7);
}

.menu-item.compact .badge.menu-type {
    background: linear-gradient(135deg, #339af0, #228be6);
}

/* ======================
   COMPACT CONTENT
   ====================== */

.menu-item.compact .menu-item-content.compact {
    padding: 8px 12px; /* slightly larger price area */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; /* vertically center inside content */
    align-items: center; /* center content horizontally */
    text-align: center; /* center text alignment */
}

@media (min-width: 1024px) {
    .menu-item.compact .menu-item-content.compact {
        padding: 12px 16px;
    }
}

@media (min-width: 1440px) {
    .menu-item.compact .menu-item-content.compact {
        padding: 14px 18px;
    }
}

/* IMPORTANT: Åsidosätt menu-cards.css stilar för compact variant */
.menu-item.compact .menu-item-header {
    display: flex !important;
    flex-direction: column !important; /* title over price */
    justify-content: center !important; /* vertically center */
    align-items: center !important; /* center horizontally */
    gap: 4px !important;
    width: 100% !important;
}

.menu-item.compact .menu-item-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.3;
    flex: 0 0 auto;
    text-align: center;
}

@media (min-width: 1024px) {
    .menu-item.compact .menu-item-title {
        font-size: 1.2rem;
    }
}

@media (min-width: 1440px) {
    .menu-item.compact .menu-item-title {
        font-size: 1.25rem;
    }
}

/* IMPORTANT: Åsidosätt menu-cards.css stilar för compact variant */
.menu-item.compact .menu-item-price {
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    color: var(--accent) !important;
    white-space: nowrap !important;
    margin-left: 0 !important;
    margin-top: 4px !important; /* place just under title */
    text-align: center !important; /* center price text */
    background: rgba(193, 39, 45, 0.1) !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    align-self: center !important; /* center price horizontally */
}

/* ======================
   EXPAND BUTTON
   ====================== */

.menu-item.compact .expand-button {
    width: 100%;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px 16px;
    margin-top: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #4a5568;
    transition: all 0.3s ease;
    outline: none;
}

.menu-item.compact .expand-button:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    color: #2d3748;
}

.menu-item.compact .expand-button:active {
    transform: translateY(0);
    background: rgba(0, 0, 0, 0.08);
}

.menu-item.compact .expand-button:focus {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.menu-item.compact .expand-icon {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.menu-item.compact.expanded .expand-icon {
    transform: rotate(180deg);
}

/* ======================
   EXPANDED CONTENT
   ====================== */

.menu-item.compact .menu-item-expanded {
    padding: 0 12px 16px 12px;
}

@media (min-width: 1024px) {
    .menu-item.compact .menu-item-expanded {
        padding: 0 16px 16px 16px;
    }
}

@media (min-width: 1440px) {
    .menu-item.compact .menu-item-expanded {
        padding: 0 18px 16px 18px;
    }
}

/* ======================
   FULL CONTENT (ALWAYS VISIBLE - DEPRECATED)
   ====================== */

.menu-item-content-full {
    padding: 16px;
}

.menu-item-description {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.5;
    margin: 0 0 16px 0;
    font-style: italic;
}

/* ======================
   META INFORMATION
   ====================== */

.menu-item-meta {
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
}

.meta-row {
    display: flex;
    margin-bottom: 8px;
    font-size: 0.85rem;
    position: relative;
}

/* Ta bort eventuella pseudo-element (::before, ::after) från meta-row */
.meta-row::before,
.meta-row::after {
    content: none !important;
    display: none !important;
}

/* Ta bort eventuella pseudo-element från ingredients också */
.meta-row.ingredients::before,
.meta-row.ingredients::after,
.ingredients::before,
.ingredients::after {
    content: none !important;
    display: none !important;
}

/* Ta bort list-style markers */
.meta-row,
.meta-row.ingredients,
.ingredients {
    list-style: none !important;
}

.meta-label {
    font-weight: 600;
    color: #2d3748;
    min-width: 100px;
    flex-shrink: 0;
}

.meta-value {
    color: #4a5568;
    line-height: 1.4;
    list-style: none !important;
}

/* Se till att inga pseudo-element finns på meta-value */
.meta-value::before,
.meta-value::after {
    content: none !important;
    display: none !important;
}

/* ======================
   DETAIL ITEMS
   ====================== */

.menu-item-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: #4a5568;
    background: #f7fafc;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.detail-item .icon {
    font-size: 0.9rem;
}

.detail-item.status-inactive {
    background: #fed7d7;
    color: #c53030;
    border-color: #feb2b2;
}


/* ======================
   RESPONSIVE DESIGN
   ====================== */

@media (max-width: 768px) {
    .menu-item.compact { min-height: 180px; }
    .menu-item.compact .menu-item-image { height: 220px; }
    .menu-item.compact .menu-item-content.compact { padding: 8px 10px; text-align: center; }
    .menu-item.compact .menu-item-header { flex-direction: column !important; justify-content: center; align-items: center; gap: 4px; }
    .menu-item.compact .menu-item-title { font-size: 1rem; text-align: center; }
    .menu-item.compact .menu-item-price { font-size: 1.1rem; text-align: left; margin-left: 0; }
    .menu-item-details { gap: 8px; }
    .detail-item { font-size: 0.75rem; }
}

@media (max-width: 480px) {
    .menu-item.compact { min-height: 220px; }
    .menu-item.compact .menu-item-image { height: 200px; }
    
    .meta-row {
        flex-direction: column;
        gap: 2px;
    }
    
    .meta-label {
        min-width: auto;
    }
}

/* ======================
   ACCESSIBILITY
   ====================== */

@media (prefers-reduced-motion: reduce) {
    .menu-item.compact {
        transition: none;
    }
}

.menu-item.compact:focus-within {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(66, 153, 225, 0.5);
}

/* ======================
   ANIMATION KEYFRAMES
   ====================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ======================
   PRINT STYLES
   ====================== */

@media print {
    /* Print styles */
}


