/* ==========================================================================
   TEDS MENU TABS — Variables
   ========================================================================== */

.tmt {
    --tmt-color-bg:          #f7f2ea;
    --tmt-color-bg-alt:      #efe8dc;
    --tmt-color-active:      #d9ccb8;
    --tmt-color-hover:       #e6ddd0;
    --tmt-color-title:       #2c2318;
    --tmt-color-cuisine:     #8b7e6e;
    --tmt-color-tab-bg:      #000000;
    --tmt-color-tab-active:  #DDBD77;
    --tmt-color-tab-text:    #5a4e3e;
    --tmt-color-border:      #d9ccb8;
    --tmt-color-white:       #ffffff;
    --tmt-radius:            8px;
    --tmt-radius-lg:         12px;
    --tmt-shadow:            0 4px 20px rgba(44, 35, 24, 0.08);
    --tmt-transition:        0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --tmt-font:              inherit;
    --tmt-breakpoint:        768px;
}

/* ==========================================================================
   Base
   ========================================================================== */

.tmt {
    display: flex;
    align-items: center;
    flex-direction: column;
    font-family: var(--tmt-font);
    width: 100%;
    margin: 0 auto;
}

.tmt *,
.tmt *::before,
.tmt *::after {
    box-sizing: border-box;
}

.tmt img {
    display: block;
    max-width: 100%;
    height: auto;
}

.tmt-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--tmt-color-cuisine);
    font-style: italic;
}

/* ==========================================================================
   Tabs
   ========================================================================== */

.tmt-tabs {
    display: flex;
    /*gap: 2rem;
    padding: 2rem 2rem 0;*/
    width: 100%;
}

.tmt-tab {
    flex: 1;
    border: none;
    background: var(--tmt-color-hover);
    color: var(--tmt-color-tab-text);
    font-family: var(--tmt-font);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--tmt-transition), color var(--tmt-transition);
    border-radius: 0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tmt-tab > svg{
    max-height: 4rem;
}

.tmt-tab:hover {
    background: var(--tmt-color-tab-bg);
    color: var(--tmt-color-white);
}

.tmt-tab.is-active {
    background: var(--tmt-color-tab-bg);
    color: var(--tmt-color-white);
}

.tmt-tab:hover > svg,
.tmt-tab:focus > svg,
.tmt-tab.is-active > svg{
    fill : #ffffff;
}

.tmt-tab-icon {
    margin-right: 8px;
    font-size: 1.1em;
}

/* ==========================================================================
   Panels
   ========================================================================== */

.tmt-panel {
    display: none;
    background: var(--tmt-color-bg);
    border-radius: 0 0 var(--tmt-radius-lg) var(--tmt-radius-lg);
    overflow: hidden;
    box-shadow: var(--tmt-shadow);
        width: 100%;
}

.tmt-panel.is-active {
    display: block;
}

/* ==========================================================================
   Desktop layout
   ========================================================================== */

.tmt-desktop {
    display: grid;
    grid-template-columns: 1fr 480px;
    min-height: 500px;
}

.tmt-mobile {
    display: none;
}

/* --- Menu display (left) --- */

.tmt-desktop > .tmt-menu-display {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px;
    background: var(--tmt-color-white);
    overflow-y: auto;
    min-height: 400px;
}

.tmt-menu-display .tmt-menu-img {
    position: absolute;
    top: 24px;
    left: 24px;
    right: 24px;
    max-width: calc(90% - 48px);
    height: auto;
    opacity: 0;
    transition: opacity var(--tmt-transition);
    pointer-events: none;
}

.tmt-menu-display .tmt-menu-img.is-active {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    max-width: 100%;
    opacity: 1;
    pointer-events: auto;
}

/* --- List (right) --- */

.tmt-list {
    border-left: 1px solid var(--tmt-color-border);
    overflow-y: auto;
    max-height: 600px;
    scrollbar-width: thin;
    scrollbar-color: var(--tmt-color-border) transparent;
}

.tmt-list::-webkit-scrollbar {
    width: 6px;
}

.tmt-list::-webkit-scrollbar-track {
    background: transparent;
}

.tmt-list::-webkit-scrollbar-thumb {
    background: var(--tmt-color-border);
    border-radius: 3px;
}

.tmt-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    cursor: pointer;
    transition: background var(--tmt-transition);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.tmt-list-item:nth-child(even) {
    background: var(--tmt-color-bg-alt);
}

.tmt-list-item:hover,
.tmt-list-item.is-active {
    background: var(--tmt-color-active);
}

.tmt-list-item.is-active {
    border-left: 3px solid var(--tmt-color-tab-active);
    padding-left: 17px;
}

.tmt-vignette {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--tmt-color-border);
}

.tmt-list-item-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tmt-item-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--tmt-color-title);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tmt-item-cuisine {
    font-size: 0.8rem;
    color: var(--tmt-color-cuisine);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   Mobile layout
   ========================================================================== */

@media (max-width: 768px) {
    .tmt-desktop {
        display: none;
    }

    .tmt-mobile {
        display: block;
    }

    /* Tabs */
    .tmt-tab {
        padding: 12px 16px;
        font-size: 0.85rem;
    }

    .tmt-tab > svg{
        max-height: 3rem;
    }

    .tmt-tab-icon {
        display: block;
        margin: 0 auto 4px;
        font-size: 1.3em;
    }

    /* --- Custom select --- */

    .tmt-select {
        position: relative;
        margin: 16px;
    }

    .tmt-select-trigger {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        padding: 12px 16px;
        background: var(--tmt-color-white);
        border: 2px solid var(--tmt-color-border);
        cursor: pointer;
        font-family: var(--tmt-font);
        text-align: left;
        border-radius: 0;
        transition: border-color var(--tmt-transition);
    }

    .tmt-select-trigger:focus {
        outline: none;
        border-color: var(--tmt-color-tab-active);
    }

    .tmt-select.is-open .tmt-select-trigger {
        border-color: var(--tmt-color-tab-active);
        border-radius: 0;
    }

    .tmt-select .tmt-select-trigger:hover,
    .tmt-select .tmt-select-trigger:focus{
        background-color: var(--tmt-color-bg-alt);
    }

    .tmt-select-trigger .tmt-vignette {
        width: 40px;
        height: 40px;
    }

    .tmt-select-trigger-text {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }

    .tmt-select-arrow {
        flex-shrink: 0;
        color: var(--tmt-color-cuisine);
        transition: transform var(--tmt-transition);
    }

    .tmt-select.is-open .tmt-select-arrow {
        transform: rotate(180deg);
    }

    /* --- Dropdown --- */

    .tmt-select-dropdown {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--tmt-color-white);
        border: 2px solid var(--tmt-color-tab-active);
        border-top: 1px solid var(--tmt-color-border);
        border-radius: 0 0 var(--tmt-radius) var(--tmt-radius);
        max-height: 280px;
        overflow-y: auto;
        z-index: 100;
        box-shadow: 0 8px 24px rgba(44, 35, 24, 0.12);
    }

    .tmt-select.is-open .tmt-select-dropdown {
        display: block;
    }

    .tmt-select-option {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        cursor: pointer;
        transition: background 0.15s ease;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    }

    .tmt-select-option:last-child {
        border-bottom: none;
    }

    .tmt-select-option:hover,
    .tmt-select-option:active {
        background: var(--tmt-color-hover);
    }

    .tmt-select-option.is-selected {
        background: var(--tmt-color-active);
    }

    .tmt-select-option .tmt-vignette {
        width: 36px;
        height: 36px;
    }

    .tmt-select-option-text {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }

    /* --- Mobile menu display --- */

    .tmt-mobile .tmt-menu-display {
        position: relative;
        min-height: 200px;
        padding: 16px;
        justify-content: center;
        display: flex;
    }

    .tmt-mobile .tmt-menu-display .tmt-menu-img {
        position: absolute;
        top: 16px;
        left: 16px;
        right: 16px;
        max-width: calc(100% - 32px);
    }

    .tmt-mobile .tmt-menu-display .tmt-menu-img.is-active {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        max-width: 100%;
    }
}

/* ==========================================================================
   Tablet adjustments
   ========================================================================== */

@media (min-width: 769px) and (max-width: 1024px) {
    .tmt-desktop {
        grid-template-columns: 1fr 300px;
    }

    .tmt-vignette {
        width: 40px;
        height: 40px;
    }

    .tmt-list-item {
        padding: 12px 14px;
        gap: 10px;
    }

    .tmt-item-title {
        font-size: 0.85rem;
    }
}
