/*
 * Text recipes: the catalogue card, the recipe page before purchase and the recipe page in the cabinet.
 * Plain CSS on purpose: the site's Tailwind build (public/build) is not rebuilt on the server, so new utility
 * classes would not exist there. Everything here starts with "ycr-".
 */

/* ---------- Catalogue card: 3 lines of the recipe's beginning and "Читати далі" ---------- */
.ycr-clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

.ycr-more {
    display: inline-block;
    margin-top: 6px;
    color: #03bd7a;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
}

.ycr-more:hover {
    text-decoration: underline;
}

@media (min-width: 1200px) {
    .ycr-more {
        font-size: 16px;
    }
}

/* The card picture is a link to the recipe, like the name. */
.ycr-card-link {
    display: block;
}

.ycr-card-link img {
    transition: opacity .15s;
}

.ycr-card-link:hover img {
    opacity: .9;
}

/* ---------- Recipe page before purchase ---------- */
/* Photo and the buy box: one under the other on a phone; side by side on a computer, centred against each other,
   so neither column ends in empty space. The products, the first step and the lock go below, across the whole width. */
.ycr-hero {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.ycr-hero-img {
    display: block;
    width: 100%;
    height: auto;
}

.ycr-hero-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: #0d0d0d;
}

@media (min-width: 802px) {
    .ycr-hero {
        flex-direction: row;
        align-items: center;
        gap: 40px;
    }

    .ycr-hero-img {
        flex: 0 0 50%;
        width: 50%;
    }

    .ycr-hero-text {
        flex: 1 1 0;
    }

    .ycr-body {
        margin-top: 40px;
        padding-top: 12px;
        border-top: 1px solid #ececec;
    }
}

@media (min-width: 1200px) {
    .ycr-hero {
        gap: 48px;
    }

    .ycr-hero-img {
        flex-basis: 55%;
        width: 55%;
    }
}

.ycr-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 20px;
}

.ycr-price-row .card-btn {
    margin-top: 0;
    padding: 12px 28px;
    white-space: nowrap;
}

.ycr-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #e5f8f1;
    color: #02955f;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.ycr-hook {
    margin-top: 16px;
    color: #0d0d0d;
    font-size: 18px;
    line-height: 1.55;
    white-space: pre-line;
}

.ycr-need {
    margin-top: 16px;
    color: #555;
    font-size: 15px;
    line-height: 1.7;
}

.ycr-need b,
.ycr-h {
    color: #0d0d0d;
    font-weight: 700;
}

.ycr-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 4px;
    padding: 1px 10px;
    border-radius: 999px;
    background: #efefef;
    color: #666;
    font-size: 13px;
    white-space: nowrap;
}

.ycr-pill svg,
.ycr-lock svg {
    flex: 0 0 auto;
}

.ycr-h {
    margin-top: 24px;
    font-size: 17px;
}

.ycr-step {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    color: #0d0d0d;
    font-size: 16px;
    line-height: 1.55;
}

.ycr-num {
    flex: 0 0 28px;
    height: 28px;
    margin-top: -1px;
    border-radius: 50%;
    background: #ececec;
    color: #0d0d0d;
    font-size: 14px;
    font-weight: 700;
    line-height: 28px;
    text-align: center;
}

.ycr-locked {
    position: relative;
    min-height: 260px;
    margin-top: 4px;
}

.ycr-fake {
    filter: blur(3px);
    opacity: .55;
    user-select: none;
}

.ycr-fake .ycr-step span:last-child {
    display: block;
    flex: 1;
}

.ycr-bar {
    display: block;
    height: 12px;
    margin: 6px 0 8px;
    border-radius: 6px;
    background: #d9d9d9;
}

.ycr-lock {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
    background: linear-gradient(rgba(255, 255, 255, .25), rgba(255, 255, 255, .92) 30%);
}

.ycr-lock-title {
    margin-top: 8px;
    text-wrap: balance;
    color: #0d0d0d;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.ycr-lock .card-btn {
    margin-top: 14px;
    padding: 14px 30px;
}

.ycr-sub {
    margin-top: 12px;
    color: #555;
    font-size: 14px;
    text-decoration: underline;
}

.ycr-owned {
    margin-top: 16px;
    color: #555;
    font-size: 15px;
}

/* ---------- Recipe page in the cabinet ---------- */
.ycr-page {
    color: #0d0d0d;
}

.ycr-crumb {
    display: inline-block;
    color: #777;
    font-size: 14px;
}

.ycr-crumb:hover {
    color: #0d0d0d;
}

.ycr-title {
    margin-top: 8px;
    font-size: 30px;
    line-height: 1.2;
}

/* Title with the heart (30.11.2026): the heart goes under the title when the line is too narrow. */
.ycr-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px 16px;
}

.ycr-fav-form {
    margin: 0;
}

.ycr-fav {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 16px;
    border: 1px solid #dcdcdc;
    border-radius: 999px;
    background: #fff;
    color: #0d0d0d;
    font-size: 15px;
    cursor: pointer;
}

.ycr-fav svg {
    fill: none;
    stroke: #0d0d0d;
}

.ycr-fav.is-on svg {
    fill: #e0245e;
    stroke: #e0245e;
}

.ycr-info {
    margin-top: 6px;
    color: #666;
    font-size: 15px;
}

/* Tabs work without JavaScript: two radio buttons, the labels are the switch. */
.ycr-tab-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ycr-tabs {
    display: flex;
    margin: 16px 0;
    padding: 4px;
    border-radius: 999px;
    background: #e8e8e8;
}

.ycr-tabs label {
    flex: 1;
    padding: 10px 0;
    border-radius: 999px;
    color: #666;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    user-select: none;
}

#ycr-tab-video:checked ~ .ycr-tabs label[for="ycr-tab-video"],
#ycr-tab-recipe:checked ~ .ycr-tabs label[for="ycr-tab-recipe"] {
    background: #fff;
    color: #0d0d0d;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

#ycr-tab-video:focus-visible ~ .ycr-tabs label[for="ycr-tab-video"],
#ycr-tab-recipe:focus-visible ~ .ycr-tabs label[for="ycr-tab-recipe"] {
    outline: 2px solid #03bd7a;
    outline-offset: 2px;
}

.ycr-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* On the phone the main column dissolves, so its parts and the ingredients can be put in tab order. */
.ycr-main {
    display: contents;
}

.ycr-pane-video {
    order: 1;
}

.ycr-side {
    order: 2;
}

.ycr-pane-steps {
    order: 3;
}

#ycr-tab-video:checked ~ .ycr-layout .ycr-side,
#ycr-tab-video:checked ~ .ycr-layout .ycr-pane-steps,
#ycr-tab-recipe:checked ~ .ycr-layout .ycr-pane-video {
    display: none;
}

.ycr-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    background: #0d0d0d;
}

/* 30.11.2026: fill the player. A 1080×1920 file with a horizontal shot in the middle is cropped exactly to the shot;
   a 16:9 file does not change, only its poster fills the player (VideoInfo::fit). Also in full screen on a computer. */
.ycr-video.is-cover {
    object-fit: cover;
}

/* Separate rules: a browser that does not know one of these selectors drops only that rule. */
.ycr-video.is-cover:fullscreen {
    object-fit: cover;
}

.ycr-video.is-cover:-webkit-full-screen {
    object-fit: cover;
}

/* A really vertical video (the page script saw a picture above or below the middle): whole, in a tall player. */
.ycr-video.is-portrait {
    width: auto;
    max-width: 100%;
    height: min(78vh, 720px);
    aspect-ratio: 9 / 16;
    margin: 0 auto;
    object-fit: contain;
}

.ycr-card {
    padding: 18px 16px;
    border-radius: 16px;
    background: #fff;
}

.ycr-pane-video .ycr-hook {
    margin-top: 16px;
}

.ycr-read {
    display: block;
    width: 100%;
    margin-top: 16px;
    cursor: pointer;
}

.ycr-section-title {
    font-size: 20px;
    font-weight: 700;
}

.ycr-group {
    margin: 16px 0 2px;
    color: #8a8a8a;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ycr-ing {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.ycr-ing input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    accent-color: #03bd7a;
}

.ycr-ing-name {
    flex: 1;
    font-size: 16px;
    line-height: 1.35;
}

.ycr-ing input:checked ~ .ycr-ing-name {
    color: #9a9a9a;
    text-decoration: line-through;
}

.ycr-amount {
    flex: 0 0 auto;
    padding: 2px 10px;
    border-radius: 999px;
    background: #f1f1f1;
    color: #0d0d0d;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.ycr-steps {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.ycr-steps .ycr-step {
    padding: 10px 0;
    font-size: 17px;
    line-height: 1.6;
}

.ycr-steps .ycr-num {
    flex-basis: 30px;
    height: 30px;
    margin-top: 0;
    line-height: 30px;
}

.ycr-note {
    padding: 6px 0;
    color: #444;
    font-size: 16px;
    line-height: 1.6;
}

/* "Не вимикати екран": shown only where the browser can keep the screen on (Screen Wake Lock). */
.ycr-wake {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #0d0d0d;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
}

.ycr-wake[hidden] {
    display: none;
}

.ycr-wake input {
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 26px;
    margin: 0;
    border-radius: 999px;
    background: #555;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: background .15s;
}

.ycr-wake input::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform .15s;
}

.ycr-wake input:checked {
    background: #03bd7a;
}

.ycr-wake input:checked::before {
    transform: translateX(20px);
}

.ycr-desktop-only {
    display: none;
}

@media (min-width: 1024px) {
    .ycr-title {
        font-size: 40px;
    }

    .ycr-tabs,
    .ycr-mobile-only {
        display: none !important;
    }

    .ycr-desktop-only {
        display: block;
    }

    .ycr-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 380px;
        align-items: start;
        gap: 40px;
        margin-top: 24px;
    }

    .ycr-main {
        display: block;
    }

    .ycr-pane-video,
    .ycr-pane-steps,
    .ycr-side {
        display: block !important;
    }

    .ycr-pane-steps {
        margin-top: 28px;
    }

    .ycr-side {
        position: sticky;
        top: 20px;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }
}

/* ---------- Home page: the «Янг Шеф» block ---------- */
/* As before 24.11 (Nikita liked it): the text centred on top, the photo under it across the whole width of the
   container, down to the bottom edge of the black section. The file is a square, so the photo is shown whole.
   Unlayered CSS, so it wins over the site's Tailwind classes. */
.yc-chef {
    padding-bottom: 0;
}

.yc-chef-photo {
    display: block;
    width: 100%;
    height: auto;
    margin: 30px 0 0;
}
