/* =========================================================
   Recipes Variant Selector – Widget styles (merged)
   ========================================================= */

.recipes-widget {
    font-family: inherit;
    margin: 0 auto;
    display: grid;
    /* 2 columns when the widget is wide enough, 1 otherwise —
       based on the widget width, not the viewport */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: clamp(24px, 4vw, 48px);
    align-items: start;
}

/* ── Left column ─────────────────────────────────────────── */

.recipes-widget__left {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* ── Image area ─────────────────────────────────────────── */

.recipes-images {
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    line-height: 0;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
}

.recipes-image {
    display: none;
}

.recipes-image.active {
    display: block;
}

.recipes-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    max-height: 380px; /* original desktop height, also caps full-width layouts */
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

/* ── Recipe title ────────────────────────────────────────── */

.elementor-widget-recipes_widget .recipes-widget__recipe-title {
    margin: 20px 0 0;
    font-size: 24px;
    line-height: 32px;
    font-weight: 700;
    color: var(--e-global-color-primary, #1F2A5E);
    font-family: var(--e-global-typography-primary-font-family, inherit);
}

/* ── Badges ──────────────────────────────────────────────── */

.recipes-widget__badges {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.recipes-widget__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
}

/* ── Variant descriptions (static) ──────────────────────── */

.recipes-widget__descriptions {
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.recipes-widget__description-item {
    font-size: 14px;
    line-height: 20px;
    color: #364153;
    font-family: var(--e-global-typography-secondary-font-family, inherit);
}

.elementor-widget-recipes_widget .recipes-widget__description-title {
    font-weight: 700;
}

.recipes-widget__description-text {
    font-weight: 400;
}

/* ── Right column ────────────────────────────────────────── */

.recipes-widget__right {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Selector grid ──────────────────────────────────────── */

/* Full width (no advices): all cards on one row.
   Next to the advice column: 2 × 2.
   Mobile: 1 card per row (see Responsive below). */
.recipes-selectors {
    display: grid;
    grid-template-columns: repeat(var(--recipes-selector-count, 4), minmax(0, 1fr));
    gap: 12px;
}

.advices-enabled .recipes-selectors {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ── Individual selector card ───────────────────────────── */

.recipes-selector {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    cursor: pointer;
    background: #fff;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.advices-enabled .recipes-selector {
    padding: 10px 12px;
}

.recipes-selector:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.25);
}

/* Toggle card active state */
.recipes-selector--toggle.active {
    border-color: #F5A623;
}

/* Selector cards are <button>s: neutralize theme / kit button styles
   (background, color, border, font, hover) so they keep the card look. */
.recipes-widget button.recipes-selector,
.recipes-widget button.recipes-selector:hover,
.recipes-widget button.recipes-selector:focus {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    width: 100%;
    font: inherit;
    text-align: start;
    text-transform: none;
    letter-spacing: normal;
    color: inherit;
    background: #fff;
    border-style: solid;
    border-width: 2px;
}

.recipes-widget button.recipes-selector:not(.active),
.recipes-widget button.recipes-selector:not(.active):hover,
.recipes-widget button.recipes-selector:not(.active):focus {
    border-color: transparent;
}

/* Keyboard focus (mouse clicks don't show it) */
.recipes-widget .recipes-selector:focus-visible,
.recipes-widget__button:focus-visible {
    outline: 3px solid #1F2A5E; /* fixed: kit colors can be too light for a 3:1 focus ring */
    outline-offset: 3px;
}

/* ── Circle indicator ───────────────────────────────────── */

.recipes-selector__circle {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.advices-enabled .recipes-selector__circle {
    width: 20px;
    height: 20px;
}

/* ── Toggle switch ──────────────────────────────────────── */

.recipes-selector__toggle {
    display: block;
    width: 46px;
    height: 27px;
    background-color: #d0d0d0;
    border-radius: 16px;
    position: relative;
    flex-shrink: 0;
    transition: background-color 0.25s ease;
}

.advices-enabled .recipes-selector__toggle {
    width: 30px;
    height: 20px;
}

.recipes-selector__toggle.on {
    background-color: #F5A623;
}

.recipes-selector__toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 21px;
    height: 21px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.advices-enabled .recipes-selector__toggle-thumb {
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
}

.recipes-selector__toggle.on .recipes-selector__toggle-thumb {
    transform: translateX(19px);
}

.advices-enabled .recipes-selector__toggle.on .recipes-selector__toggle-thumb {
    transform: translateX(10px);
}

/* ── Text labels ────────────────────────────────────────── */

.recipes-selector__text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.recipes-selector__label {
    font-weight: 700;
    font-size: 14px;
    color: #1a1a1a;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.recipes-selector__subtitle {
    font-size: 12px;
    color: #6b6b6b; /* was #999 (2.8:1) — now 5.3:1 on white, WCAG AA */
    line-height: 1.2;
    overflow-wrap: anywhere;
}

/* ── Advice panels ──────────────────────────────────────── */

.recipes-widget__advice-panel {
    display: none;
    flex-direction: column;
    gap: 16px;
    background: rgba(0, 0, 0, 0.025);
    border: 1px solid #ddd;
    border-left-width: 4px;
    border-radius: 12px;
    padding: 28px;
}

.recipes-widget__advice-panel.active {
    display: flex;
}

.elementor-widget-recipes_widget .recipes-widget__advice-title {
	margin: 0;
	font-size: 24px;
  font-family: var(--e-global-typography-primary-font-family);
	line-height: 32px;
	font-weight: 700;
	color: var(--e-global-color-primary);
}

.recipes-widget__advice-text {
    font-size: 16px;
    line-height: 26px;
    color: #364153;
    font-family: var(--e-global-typography-secondary-font-family, inherit);
}

.recipes-widget__advice-text p {
    margin: 0 0 12px;
}

.recipes-widget__advice-text p:last-child {
    margin-bottom: 0;
}

.recipes-widget__profile {
	margin: auto 0 0;
	background: #fff;
	border-radius: 10px;
	padding: 14px;
	font-size: clamp(15px, 1.1vw, 19px);
	line-height: 1.4;
	color: var(--e-global-color-primary);
}

/* ── Button ─────────────────────────────────────────────── */

.recipes-widget__button {
    display: block;
    text-align: center;
    text-decoration: none;
    background: var(--e-global-color-accent, #E9406C);
    border-radius: 999px;
    padding: 13px 24px;
    font-size: 16px;
    line-height: 22px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.recipes-widget__button:hover {
    background: var(--e-global-color-primary, #1F2A5E);
}

/* Beats the kit's link colors (a, a:hover) without !important,
   so the Style tab controls can still override it. */
.elementor-widget-recipes_widget .recipes-widget a.recipes-widget__button,
.elementor-widget-recipes_widget .recipes-widget a.recipes-widget__button:hover {
    color: #ffffff;
}

/* ── Responsive ─────────────────────────────────────────── */

/* Column layout is handled by the auto-fit grid above (based on the widget
   width). No container queries: size containment breaks Elementor flex
   containers (wrap / row direction) by collapsing the widget's intrinsic width. */

@media (max-width: 767px) {
    .recipes-images {
        padding: 16px;
        margin-bottom: 16px;
    }

    .elementor-widget-recipes_widget .recipes-widget__recipe-title {
        margin-top: 16px;
        font-size: 20px;
        line-height: 1.3;
    }

    .recipes-selectors,
    .advices-enabled .recipes-selectors {
        grid-template-columns: minmax(0, 1fr);
    }

    .recipes-selector,
    .advices-enabled .recipes-selector {
        padding: 10px 12px;
    }

    /* Stacked cards: center the dot in a toggle-wide slot so all labels align */
    .recipes-selector__circle {
        margin-inline: 3px;
    }

    .advices-enabled .recipes-selector__circle {
        margin-inline: 5px;
    }

    .recipes-widget__advice-panel {
        padding: 20px;
    }

    .elementor-widget-recipes_widget .recipes-widget__advice-title {
        font-size: 20px;
        line-height: 1.3;
    }
}

/* ── Reduced motion ─────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .recipes-selector,
    .recipes-selector__toggle,
    .recipes-selector__toggle-thumb,
    .recipes-widget__button {
        transition: none;
    }
}

/* No focus ring on mouse click (theme :focus styles), only on keyboard focus */
.recipes-widget button.recipes-selector:focus:not(:focus-visible) {
    outline: none;
}
