/*
 * Toasted Menus — Frontend Stylesheet
 *
 * Colors are NOT set here by default — your theme controls them.
 * Set overrides from Settings → Toasted Menus, or in your theme CSS:
 *
 *   .toasted-menu-title { color: #8B0000; }
 *   .toasted-section-title { color: #8B0000; }
 *   .toasted-item-name { color: #8B0000; }
 */

/* ── Container ──────────────────────────────── */
.toasted-wrap {
    --tm-dots:           rgba(0,0,0,0.15);
    --tm-section-border: rgba(0,0,0,0.08);
    --tm-divider:        rgba(0,0,0,0.06);
    --tm-image-size:     100px;
    --tm-columns:        2;
    --tm-gap:            2rem;
    --tm-item-gap:       1.5rem;
    --tm-menu-title-size: 32px;

    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    line-height: 1.5;
}

/* ── Menu Title ─────────────────────────────── */
.toasted-menu-title {
    text-align: center;
    font-size: var(--tm-menu-title-size) !important;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid currentColor;
    /* No color set — inherits from theme h2 */
}

.toasted-menu-desc {
    text-align: center;
    font-style: italic;
    opacity: 0.6;
    margin: -1.5rem 0 2rem;
    font-size: 0.95rem;
}

/* ── Section ────────────────────────────────── */
.toasted-section {
    margin-bottom: 2.5rem;
}

.toasted-section-title {
    font-size: 1.4rem !important;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 1.25rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--tm-section-border);
    /* No color set — inherits from theme h3 */
}

.toasted-section-desc {
    font-style: italic;
    opacity: 0.6;
    margin: -0.75rem 0 1.25rem;
    font-size: 0.9rem;
}

/* ── Items Grid ─────────────────────────────── */
.toasted-items {
    display: grid;
    grid-template-columns: repeat(var(--tm-columns, 2), 1fr);
    gap: var(--tm-item-gap) var(--tm-gap);
}

/* ── Individual Item ────────────────────────── */
.toasted-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: var(--tm-item-gap);
    border-bottom: 1px solid var(--tm-divider);
}

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

/* ── Circular Image ─────────────────────────── */
.toasted-item-image {
    flex-shrink: 0;
    width: var(--tm-image-size);
    height: var(--tm-image-size);
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.toasted-item-image img {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    object-fit: cover;
    display: block;
}

/* ── Item Body ──────────────────────────────── */
.toasted-item-body {
    flex: 1;
    min-width: 0;
    padding-top: 0.15rem;
}

/* ── Item Header (name .... price) ──────────── */
.toasted-item-header {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.toasted-item-name {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex-shrink: 0;
    text-decoration: none;
    cursor: default;
    transition: color 0.2s ease;
    /* Color inherited from theme link styles (a tag) */
}

.toasted-item-name:hover {
    text-decoration: none;
    /* Hover color inherited from theme link hover styles */
}

.toasted-item-dots {
    flex: 1;
    min-width: 16px;
    border-bottom: 2px dotted var(--tm-dots);
    position: relative;
    top: -0.3em;
}

.toasted-item-price {
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    white-space: nowrap;
    /* No color set — inherits from theme */
}

/* ── Item Description ───────────────────────── */
.toasted-item-desc {
    margin: 0.3rem 0 0 !important;
    padding: 0;
    font-size: 0.9rem;
    opacity: 0.65;
    line-height: 1.45;
}

.toasted-item-desc + .toasted-modifiers {
    margin-top: 0.1rem;
}

/* ── Empty State ────────────────────────────── */
.toasted-empty {
    text-align: center;
    padding: 3rem 1rem;
    opacity: 0.5;
    font-style: italic;
}

/* ── Modifiers ──────────────────────────────── */
.toasted-modifiers {
    margin: 0;
    font-size: 0.8rem !important;
    line-height: 1.4;
    opacity: 0.65;
}

.toasted-mod-label {
    font-weight: 600;
    font-style: italic;
    font-size: 0.8rem !important;
}

.toasted-mod-note {
    font-weight: 400;
    font-size: 0.8rem !important;
}

.toasted-mod-options {
    font-weight: 400;
    font-size: 0.8rem !important;
}

/* ── Admin color overrides (injected by PHP when set) ── */
/* These classes are added via <style> block only when
   colors are configured in Settings → Toasted Menus. */

/* ── Responsive: Tablet ─────────────────────── */
@media (max-width: 768px) {
    .toasted-wrap {
        padding: 1rem 0.75rem;
        --tm-image-size: 80px;
    }

    .toasted-items {
        grid-template-columns: 1fr !important;
    }

    .toasted-menu-title {
        font-size: calc(var(--tm-menu-title-size) * 0.75) !important;
    }

    .toasted-section-title {
        font-size: 1.2rem;
    }
}

/* ── Responsive: Small Mobile ───────────────── */
@media (max-width: 480px) {
    .toasted-wrap {
        --tm-image-size: 70px;
    }

    .toasted-item {
        gap: 0.75rem;
    }

    .toasted-item-name {
        font-size: 0.9rem;
    }

    .toasted-item-desc {
        font-size: 0.85rem;
    }
}

/* ── No-image variant ───────────────────────── */
.toasted-item:not(.toasted-item--has-image) .toasted-item-body {
    padding-top: 0;
}

/* ── Square image shape ─────────────────────── */
.toasted-shape-square .toasted-item-image {
    border-radius: 8px;
}
