/**
 * Zwyssig Meal Plan — Public stylesheet (v0.4.0)
 *
 * Otmar-style accordion layout:
 *   - One row per day, click to expand/collapse.
 *   - Today's row gets a bronze banner.
 *   - Other expanded rows get a neutral light banner.
 *   - Collapsed rows: small abbreviation on the left, date in the middle,
 *     "+" icon on the right.
 *
 * All colors and key sizes are CSS custom properties so the client can
 * override them via theme CSS without touching the plugin.
 */

.zwyssig-mealplan {
    box-sizing: border-box;
}

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

/* === Intro (headline + soup/salad note) === */
.zwyssig-mealplan__intro {
    margin-bottom: 40px;
}
.zwyssig-mealplan__title {
    margin-block-start: 0!important;
}
.zwyssig-mealplan__note {
    margin: 0;
    font-style: italic;
}

/* === Empty state === */
.zwyssig-mealplan--empty .zwyssig-mealplan__empty-message {
    font-style: italic;
    margin: 0;
}

/* === Week === */
.zwyssig-mealplan__week {
    margin-bottom: 40px;
}
.zwyssig-mealplan__week:last-child {
    margin-bottom: 0;
}

.zwyssig-mealplan__week-header {
    display: flex;
    align-items: baseline;
	justify-content:center;
	
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.zwyssig-mealplan__week-label ,.zwyssig-mealplan__week-range{
    font-size: var(--e-global-typography-166e1e1-font-size);
    text-transform: uppercase;
}
.zwyssig-mealplan__week-label {
   font-weight: 500;
}
.zwyssig-mealplan__days {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* === Day (accordion row) === */
.zwyssig-mealplan__day {
    border-radius: 32px;
    overflow: hidden;
    background: #F4ECE7;
    transition: background-color 120ms ease;
}

.zwyssig-mealplan__day-toggle {
    display: flex;
    align-items: center;
	justify-content: space-between;
    gap: 20px;
    width: 100%;
    padding: 20px 40px;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: inherit;
    font: inherit;
    text-align: left;
    transition: background-color 120ms ease;
}
.zwyssig-mealplan__day-toggle:hover,
.zwyssig-mealplan__day-toggle:focus-visible {
    background: #F4ECE7;
    outline: 0;
}
.zwyssig-mealplan__day-heading {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: var(--e-global-typography-primary-font-size);
}
.zwyssig-mealplan__day-weekday-long {
     font-weight: 500;
}

/* "+" / "−" icon */
.zwyssig-mealplan__day-icon {
    width: 1.5rem;
    height: 1.5rem;
    position: relative;
    flex-shrink: 0;
}
.zwyssig-mealplan__day-icon::before,
.zwyssig-mealplan__day-icon::after {
    content: "";
    position: absolute;
    background: currentColor;
    border-radius: 1px;
    transition: transform 180ms ease, opacity 180ms ease;
}
.zwyssig-mealplan__day-icon::before {
    /* horizontal bar */
    top: 50%;
    left: 25%;
    right: 25%;
    height: 2px;
    transform: translateY(-50%);
}
.zwyssig-mealplan__day-icon::after {
    /* vertical bar — hidden when open to make a minus sign */
    top: 25%;
    bottom: 25%;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
}
.zwyssig-mealplan__day.is-open .zwyssig-mealplan__day-icon::after {
    opacity: 0;
    transform: translateX(-50%) rotate(90deg);
}

/* === Open state — non-today === */
.zwyssig-mealplan__day.is-open .zwyssig-mealplan__day-toggle {
    background: #F4ECE7;
}
.zwyssig-mealplan__day .zwyssig-mealplan__day-weekday-short {
    display: none;
}

/* === Open state — today (bronze) === */
.zwyssig-mealplan__day.is-today.is-open .zwyssig-mealplan__day-toggle {
    background: var( --e-global-color-2d1e99b );
    color: var(--e-global-color-a7692c7);
}
/* === Day panel (expanded content) === */
.zwyssig-mealplan__day-panel {
    padding: 20px 40px;
    background: #fdfdfd;
    border: 1px solid #F4ECE7;
    border-top: 0;
    border-radius: 0 0 32px 32px;
}

/* === Menus grid === */
.zwyssig-mealplan__menus {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    align-items: start;
}

.zwyssig-mealplan__menu-title {
    margin: 0 0 0.6rem 0;
}
.zwyssig-mealplan__menu-items {
    list-style: disc;
    padding-left: 1.25rem;
    margin: 0;
}
.zwyssig-mealplan__menu-items li {
    font-size: var(--e-global-typography-text-font-size);
    line-height: 1.5;
    color: var(--zm-color-text);
    padding: 0.1rem 0;
}

/* === Mobile === */
@media (max-width: 640px) {
    .zwyssig-mealplan__day-toggle {
        padding: 10px 20px;
        gap: 0.6rem;
    }
	.zwyssig-mealplan__day-panel {
		padding: 10px 20px;
	}
    .zwyssig-mealplan__menus {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .zwyssig-mealplan__day,
    .zwyssig-mealplan__day-toggle,
    .zwyssig-mealplan__day-icon::before,
    .zwyssig-mealplan__day-icon::after {
        transition: none;
    }
}
