/**
 * Fork & Form Menu Extractor - Frontend Menu Styles
 */

/* Box sizing */
.ffme-menu-container,
.ffme-menu-container * {
    box-sizing: border-box;
}

/* Container */
.ffme-menu-container {
    --ffme-bg-color: #ffffff;
    --ffme-text-color: #333333;
    --ffme-description-color: #666666;
    --ffme-border-color: #e0e0e0;
    --ffme-border-color: color-mix(in srgb, var(--ffme-text-color) 15%, transparent);

    background-color: var(--ffme-bg-color);
    color: var(--ffme-text-color);
    font-family: 'Sorts Mill Goudy', Georgia, serif;
    line-height: 1.6;
    padding: 50px;
    max-width: 900px;
    margin: 0 auto;
}

/* No menus fallback */
.ffme-no-menus {
    text-align: center;
    padding: 80px 50px;
}

.ffme-no-menus p {
    font-size: 18px;
    color: var(--ffme-description-color);
    font-style: italic;
    margin: 0;
}

/* Tabs Navigation */
.ffme-menu-tabs {
    margin-bottom: 50px;
    border-bottom: 1px solid var(--ffme-border-color);
}

.ffme-menu-tabs ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.ffme-menu-tabs li {
    position: relative;
    margin: 0;
    padding: 0;
}

.ffme-menu-tabs a {
    display: block;
    padding: 0 0 15px;
    text-decoration: none;
    color: var(--ffme-description-color);
    font-size: 17px;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
    cursor: pointer;
}

.ffme-menu-tabs a:hover,
.ffme-menu-tabs a:focus {
    color: var(--ffme-text-color);
    text-decoration: none;
}

.ffme-menu-tabs li.active a {
    color: var(--ffme-text-color);
}

.ffme-menu-tabs li::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--ffme-text-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.ffme-menu-tabs li.active::after {
    transform: scaleX(1);
}

/* Tab Content */
.ffme-tab-panel {
    display: none;
    animation: ffmeFadeIn 0.4s ease;
}

.ffme-tab-panel.active {
    display: block;
}

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

/* Menu Section */
.ffme-menu-section {
    margin-bottom: 55px;
}

.ffme-menu-section:last-child {
    margin-bottom: 0;
}

/* Section Header (title + price inline) */
.ffme-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ffme-border-color);
}

/* Section Title */
.ffme-section-title {
    font-size: 24px;
    font-weight: 500;
    color: var(--ffme-text-color);
    margin: 0;
    letter-spacing: 0.3px;
}

/* Section Price (inline with title) */
.ffme-section-price {
    font-size: 18px;
    color: var(--ffme-text-color);
    font-weight: 500;
    white-space: nowrap;
}

/* Section Description */
.ffme-section-description {
    font-size: 15px;
    color: var(--ffme-description-color);
    margin: 0 0 25px;
    font-style: italic;
    line-height: 1.7;
    max-width: 600px;
}

/* Menu Items Container */
.ffme-menu-items {
    display: flex;
    flex-direction: column;
}

/* Individual Menu Item */
.ffme-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid var(--ffme-border-color);
    transition: background-color 0.2s ease;
}

.ffme-menu-item:last-child {
    border-bottom: none;
}

/* Item Details (name + description) */
.ffme-item-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    padding-right: 25px;
}

.ffme-item-name {
    font-size: 16px;
    color: var(--ffme-text-color);
    font-weight: 400;
    line-height: 1.4;
}

.ffme-item-description {
    font-size: 14px;
    color: var(--ffme-description-color);
    font-style: italic;
    line-height: 1.5;
}

/* Item Price */
.ffme-item-price {
    font-size: 16px;
    color: var(--ffme-text-color);
    white-space: nowrap;
    text-align: right;
    min-width: 70px;
    font-weight: 400;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .ffme-menu-container {
        padding: 35px 25px;
    }

    .ffme-menu-tabs ul {
        gap: 25px;
    }

    .ffme-menu-tabs a {
        font-size: 15px;
    }

    .ffme-section-title {
        font-size: 21px;
    }

    .ffme-menu-section {
        margin-bottom: 45px;
    }

    .ffme-menu-item {
        padding: 12px 0;
    }

    .ffme-item-name {
        font-size: 15px;
    }

    .ffme-item-price {
        font-size: 15px;
        min-width: 60px;
    }
}

@media (max-width: 480px) {
    .ffme-menu-container {
        padding: 25px 18px;
    }

    .ffme-menu-tabs {
        margin-bottom: 35px;
    }

    .ffme-menu-tabs ul {
        gap: 18px;
    }

    .ffme-menu-tabs a {
        font-size: 14px;
        padding-bottom: 12px;
    }

    .ffme-section-header {
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

    .ffme-section-title {
        font-size: 19px;
    }

    .ffme-section-price {
        font-size: 16px;
    }

    .ffme-section-description {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .ffme-menu-section {
        margin-bottom: 40px;
    }

    .ffme-item-details {
        padding-right: 15px;
    }

    .ffme-item-name {
        font-size: 14px;
    }

    .ffme-item-description {
        font-size: 13px;
    }

    .ffme-item-price {
        font-size: 14px;
        min-width: 50px;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .ffme-tab-panel {
        animation: none;
    }

    .ffme-menu-tabs a,
    .ffme-menu-tabs li::after,
    .ffme-menu-item {
        transition: none;
    }
}

/* Print styles */
@media print {
    .ffme-menu-container {
        padding: 0;
        max-width: none;
    }

    .ffme-menu-tabs {
        display: none;
    }

    .ffme-tab-panel {
        display: block !important;
        page-break-inside: avoid;
    }

    .ffme-menu-section {
        page-break-inside: avoid;
    }
}
