/*
 * Zapechka — recipe social / discussion polish.
 *
 * Borrow modern community-interface density without copying another site.
 * Zapechka's speech-bubble conversation remains part of its visual identity.
 */

/* ==========================================================
   Culinary facts
   ========================================================== */

.recipe-page .recipe-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
}

.recipe-page .recipe-meta-item {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    padding: 7px 12px;
    border: 0;
    border-radius: 999px;
    color: #745f52;
    background: #fff2e8;
    box-shadow: none;
    font-size: 13px;
    font-weight: 580;
    line-height: 1.2;
}

.recipe-page .difficulty-badge {
    color: #795548;
    background: #f8eee7;
}


/* ==========================================================
   Social activity
   ========================================================== */

.recipe-social-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
}

.recipe-social-control,
.recipe-page
.recipe-favorite-button.recipe-social-control {
    min-width: 42px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid rgba(91, 70, 57, .06);
    border-radius: 13px;
    color: #453a33;
    background: #f7f6f5;
    box-shadow: none;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition:
        background .15s ease,
        border-color .15s ease,
        transform .15s ease;
}

.recipe-social-control:hover,
.recipe-page
.recipe-favorite-button.recipe-social-control:hover {
    color: #332a25;
    border-color: rgba(198, 95, 61, .14);
    background: #fff1e8;
    transform: translateY(-1px);
}

.recipe-social-control:active {
    transform: none;
}

.recipe-social-views {
    cursor: default;
}

.recipe-social-share {
    font-size: 20px;
    font-weight: 500;
}


/* ==========================================================
   Discussion
   ========================================================== */

.recipe-comments-section {
    overflow: visible;
    border: 0;
    border-radius: 24px;
    background: #fff;
    box-shadow:
        0 10px 32px rgba(85, 55, 35, .055);
}

.recipe-comments-section::before {
    content: none;
}

.recipe-comments-head {
    margin-bottom: 20px;
}

.recipe-comments-title {
    font-size:
        clamp(1.65rem, 3vw, 2.15rem);
    letter-spacing: -.035em;
}

.recipe-comments-count {
    min-width: 30px;
    height: 30px;
    padding: 0 9px;
    border-color:
        rgba(198, 95, 61, .14);
    background: #fff1e8;
    font-size: 13px;
}

.recipe-comments-list {
    gap: 26px;
}

.recipe-comment {
    padding-bottom: 22px;
    border-bottom-color:
        rgba(85, 55, 35, .075);
}

.recipe-comment-header {
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
    padding: 0;
}

.recipe-comment-identity {
    gap: 8px;
}

.recipe-comment-avatar {
    width: 40px;
    height: 40px;
    border-width: 2px;
    box-shadow:
        0 4px 12px
        rgba(83, 55, 37, .12);
}

.recipe-comment-author,
.recipe-comment-author-link {
    font-size: 14px;
    font-weight: 780;
}

.recipe-comment-author-badge {
    padding: 3px 7px;
    border: 0;
    background: #fff0e4;
    font-size: 10px;
    font-weight: 720;
}

.recipe-comment-time {
    color: #a0948c;
    font-size: 12px;
}

.recipe-comment-body,
.recipe-comment-deleted {
    max-width: 860px;
    padding: 14px 16px;
    border-color:
        rgba(112, 73, 48, .12);
    border-radius:
        15px 15px 15px 5px;
    background: #fffdfb;
    box-shadow:
        0 4px 14px
        rgba(83, 55, 37, .045);
    font-size: 15px;
    line-height: 1.55;
}

.recipe-comment-body::before,
.recipe-comment-deleted::before {
    top: -9px;
    left: 18px;
    border-right-width: 9px;
    border-bottom-width: 9px;
    border-left-width: 9px;
}

.recipe-comment-body::after,
.recipe-comment-deleted::after {
    top: -7px;
    left: 19px;
    border-right-width: 8px;
    border-bottom-width: 8px;
    border-left-width: 8px;
    border-bottom-color: #fffdfb;
}

.recipe-comment-actions {
    gap: 14px;
    margin-top: 7px;
    padding: 0 5px;
}

.recipe-comment-action {
    min-height: 30px;
    padding: 4px 3px;
    border: 0;
    border-radius: 0;
    color: #806b5f;
    background: transparent;
    box-shadow: none;
    font-size: 12px;
    font-weight: 680;
}

.recipe-comment-action:hover {
    color: #a94d32;
    background: transparent;
}

/*
 * Only the actual Reply control receives the conversational arrow.
 * Delete/Edit keep their existing semantics.
 */
.recipe-comment-actions
.recipe-comment-action:first-child::before {
    content: "↩ ";
}

.recipe-comment-replies {
    gap: 19px;
    margin:
        18px 0 0 22px;
    padding-left: 25px;
    border-left:
        1px solid
        rgba(198, 95, 61, .18);
}

.recipe-comment-replies::before {
    left: -1px;
    width: 17px;
    height: 1px;
    background:
        rgba(198, 95, 61, .18);
}

.recipe-comment-reply
.recipe-comment-avatar {
    width: 34px;
    height: 34px;
}

.recipe-comment-reply
.recipe-comment-body,
.recipe-comment-reply
.recipe-comment-deleted {
    padding: 12px 14px;
    background: #fff9f4;
    box-shadow: none;
}

.recipe-comment-reply
.recipe-comment-body::after,
.recipe-comment-reply
.recipe-comment-deleted::after {
    border-bottom-color: #fff9f4;
}

.recipe-comment-form {
    padding: 14px;
    border-color:
        rgba(112, 73, 48, .10);
    background: #fffdfb;
    box-shadow: none;
}


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

@media (max-width: 640px) {
    .recipe-page .recipe-meta {
        gap: 6px;
        margin-top: 15px;
    }

    .recipe-page .recipe-meta-item {
        min-height: 32px;
        padding: 7px 10px;
        font-size: 12px;
    }

    .recipe-social-bar {
        gap: 6px;
        margin-top: 12px;
    }

    .recipe-social-control,
    .recipe-page
    .recipe-favorite-button.recipe-social-control {
        min-height: 36px;
        padding: 8px 11px;
        border-radius: 12px;
        font-size: 13px;
    }

    /*
     * Existing Zapechka mobile contract:
     * public recipe sections touch both edges.
     */
    .recipe-comments-section {
        border-radius: 0;
        box-shadow: none;
    }

    .recipe-comments-list {
        gap: 22px;
    }

    .recipe-comment-header {
        display: grid;
        grid-template-columns:
            auto 1fr;
        gap: 0 9px;
    }

    .recipe-comment-avatar {
        grid-row: 1 / span 2;
        width: 38px;
        height: 38px;
    }

    .recipe-comment-identity {
        align-self: end;
    }

    .recipe-comment-time {
        width: auto;
        margin: 2px 0 0;
        align-self: start;
    }

    .recipe-comment-body,
    .recipe-comment-deleted {
        padding: 13px 14px;
        font-size: 14px;
        line-height: 1.5;
    }

    .recipe-comment-replies {
        margin-left: 9px;
        padding-left: 18px;
    }

    .recipe-comment-reply
    .recipe-comment-time {
        margin-left: 0;
    }

    .recipe-comment-actions {
        margin-top: 5px;
    }
}


/* ==========================================================
   Social / discussion visual V2
   2026-08 — presentation only.

   IMPORTANT:
   This layer deliberately changes no comment/favorite logic.
   It only improves visual hierarchy and touch targets.
   ========================================================== */


/* ----------------------------------------------------------
   Social activity — larger community-style controls
   ---------------------------------------------------------- */

.recipe-social-bar {
    gap: 9px;
    margin-top: 17px;
}

.recipe-social-control,
.recipe-page
.recipe-favorite-button.recipe-social-control {
    min-width: 48px;
    min-height: 44px;

    gap: 7px;

    padding: 9px 14px;

    border:
        1px solid rgba(70, 55, 46, .07);

    border-radius: 15px;

    color: #4d433d;
    background: #f7f6f5;

    font-size: 15px;
    font-weight: 700;

    box-shadow:
        0 1px 2px rgba(65, 47, 36, .025);

    transition:
        color .16s ease,
        background .16s ease,
        border-color .16s ease,
        box-shadow .16s ease,
        transform .16s ease;
}


.recipe-social-control:hover,
.recipe-page
.recipe-favorite-button.recipe-social-control:hover {
    border-color:
        rgba(198, 95, 61, .16);

    background: #fff3ec;

    box-shadow:
        0 4px 12px rgba(93, 57, 39, .06);

    transform:
        translateY(-1px);
}


.recipe-social-control:active,
.recipe-page
.recipe-favorite-button.recipe-social-control:active {
    transform:
        scale(.97);
}


/*
 * Favorite.
 *
 * recipe.js already owns the real state through .is-favorited.
 * CSS only visualises that state.
 */

.recipe-page
.recipe-favorite-button.recipe-social-control {
    font-size: 17px;
    letter-spacing: .01em;
}


.recipe-page
.recipe-favorite-button.recipe-social-control.is-favorited {
    color: #d92d3a;

    border-color:
        rgba(217, 45, 58, .12);

    background: #fff1f2;

    font-size: 18px;
    font-weight: 800;
}


.recipe-page
.recipe-favorite-button.recipe-social-control.is-favorited:hover {
    color: #c81e2d;

    border-color:
        rgba(217, 45, 58, .20);

    background: #ffe8eb;
}


/* Comments and views stay visually neutral. */

.recipe-social-comments {
    color: #514740;
}

.recipe-social-views {
    color: #625750;
}


/*
 * Share is intentionally icon-like rather than visually dominant.
 */

.recipe-social-share {
    min-width: 44px;
    padding-left: 12px;
    padding-right: 12px;

    font-size: 22px;
    font-weight: 500;
}


/* ----------------------------------------------------------
   Discussion container
   ---------------------------------------------------------- */

.recipe-comments-section {
    padding-top: 27px;
    padding-bottom: 30px;

    border: 0;
    border-radius: 22px;

    background: #fff;

    box-shadow:
        0 8px 28px rgba(72, 48, 34, .045);
}


.recipe-comments-head {
    margin-bottom: 22px;
}


.recipe-comments-title {
    color: #302923;

    font-size:
        clamp(1.55rem, 2.8vw, 2rem);

    font-weight: 850;

    letter-spacing: -.035em;
}


.recipe-comments-count {
    min-width: 29px;
    height: 29px;

    padding: 0 9px;

    border: 0;

    color: #9d4932;
    background: #fff0e7;

    font-size: 13px;
    font-weight: 800;
}


/* ----------------------------------------------------------
   Individual comment
   ---------------------------------------------------------- */

.recipe-comments-list {
    gap: 25px;
}


.recipe-comment {
    padding-bottom: 23px;

    border-bottom:
        1px solid rgba(71, 54, 43, .075);
}


.recipe-comment-header {
    gap: 10px;

    margin-bottom: 10px;

    padding: 0 1px;
}


.recipe-comment-identity {
    gap: 8px;
}


.recipe-comment-avatar {
    width: 42px;
    height: 42px;

    border-width: 2px;

    box-shadow:
        0 3px 11px rgba(74, 51, 37, .11);
}


.recipe-comment-author,
.recipe-comment-author-link {
    color: #332c27;

    font-size: 14px;
    font-weight: 800;
}


.recipe-comment-author-badge {
    padding: 4px 8px;

    border: 0;

    border-radius: 999px;

    color: #94512d;
    background: #fff0e4;

    font-size: 10px;
    font-weight: 760;
}


.recipe-comment-time {
    color: #9a918b;

    font-size: 12px;
    font-weight: 500;
}


/* ----------------------------------------------------------
   Zapechka signature: speech bubble
   ---------------------------------------------------------- */

.recipe-comment-body,
.recipe-comment-deleted {
    max-width: 900px;

    padding: 15px 17px;

    border:
        1px solid rgba(93, 69, 53, .11);

    border-radius:
        16px 16px 16px 6px;

    color: #332c27;
    background: #fffdfb;

    box-shadow:
        0 3px 12px rgba(72, 48, 34, .035);

    font-size: 15px;
    line-height: 1.58;
}


/*
 * Keep the comic speech-tail, but make it subtle.
 */

.recipe-comment-body::before,
.recipe-comment-deleted::before {
    top: -9px;
    left: 18px;

    border-right-width: 9px;
    border-bottom-width: 9px;
    border-left-width: 9px;

    border-bottom-color:
        rgba(93, 69, 53, .11);
}


.recipe-comment-body::after,
.recipe-comment-deleted::after {
    top: -7px;
    left: 19px;

    border-right-width: 8px;
    border-bottom-width: 8px;
    border-left-width: 8px;

    border-bottom-color: #fffdfb;
}


/* ----------------------------------------------------------
   Comment actions
   ---------------------------------------------------------- */

.recipe-comment-actions {
    display: flex;
    flex-wrap: wrap;

    gap: 15px;

    margin-top: 8px;

    padding: 0 5px;
}


.recipe-comment-action {
    min-height: 30px;

    padding: 3px 1px;

    border: 0;
    border-radius: 0;

    color: #786b63;
    background: transparent;

    font-size: 12px;
    font-weight: 700;

    box-shadow: none;
}


.recipe-comment-action:hover {
    color: #a64b31;
    background: transparent;
}


.recipe-comment-delete:hover {
    color: #bd3434;
}


/*
 * Conversational reply marker.
 * Existing JS remains untouched.
 */

.recipe-comment-actions
.recipe-comment-action:first-child::before {
    content: "↩ ";
}


/* ----------------------------------------------------------
   Replies / thread
   ---------------------------------------------------------- */

.recipe-comment-replies {
    gap: 19px;

    margin:
        18px 0 0 23px;

    padding-left: 25px;

    border-left:
        2px solid rgba(198, 95, 61, .13);
}


.recipe-comment-replies::before {
    left: -2px;

    width: 18px;
    height: 2px;

    background:
        rgba(198, 95, 61, .13);
}


.recipe-comment-reply
.recipe-comment-avatar {
    width: 35px;
    height: 35px;
}


.recipe-comment-reply
.recipe-comment-body,
.recipe-comment-reply
.recipe-comment-deleted {
    padding: 13px 15px;

    border-radius:
        14px 14px 14px 5px;

    background: #fff9f4;

    box-shadow: none;
}


.recipe-comment-reply
.recipe-comment-body::after,
.recipe-comment-reply
.recipe-comment-deleted::after {
    border-bottom-color: #fff9f4;
}


/* ----------------------------------------------------------
   Comment composer
   ---------------------------------------------------------- */

.recipe-comment-form {
    padding: 15px;

    border:
        1px solid rgba(93, 69, 53, .09);

    border-radius: 17px;

    background: #fffdfb;

    box-shadow: none;
}


.recipe-comment-textarea {
    border-color:
        rgba(93, 69, 53, .13);

    background: #fff;
}


.recipe-comment-textarea:focus {
    border-color:
        rgba(198, 95, 61, .43);

    box-shadow:
        0 0 0 3px rgba(198, 95, 61, .08);
}


/* ----------------------------------------------------------
   Mobile
   ---------------------------------------------------------- */

@media (max-width: 640px) {

    .recipe-social-bar {
        gap: 7px;

        margin-top: 14px;
    }


    .recipe-social-control,
    .recipe-page
    .recipe-favorite-button.recipe-social-control {
        min-width: 44px;
        min-height: 42px;

        padding: 8px 12px;

        border-radius: 14px;

        font-size: 14px;
    }


    .recipe-page
    .recipe-favorite-button.recipe-social-control {
        font-size: 16px;
    }


    .recipe-page
    .recipe-favorite-button.recipe-social-control.is-favorited {
        font-size: 18px;
    }


    .recipe-social-share {
        font-size: 21px;
    }


    /*
     * Preserve existing edge-to-edge recipe mobile contract.
     */

    .recipe-comments-section {
        padding-top: 22px;
        padding-bottom: 25px;

        border-radius: 0;

        box-shadow: none;
    }


    .recipe-comments-head {
        margin-bottom: 18px;
    }


    .recipe-comments-list {
        gap: 22px;
    }


    .recipe-comment {
        padding-bottom: 21px;
    }


    .recipe-comment-header {
        display: grid;

        grid-template-columns:
            auto minmax(0, 1fr);

        gap: 0 9px;
    }


    .recipe-comment-avatar {
        grid-row: 1 / span 2;

        width: 39px;
        height: 39px;
    }


    .recipe-comment-identity {
        align-self: end;

        gap: 6px;
    }


    .recipe-comment-time {
        width: auto;

        margin: 2px 0 0;

        align-self: start;
    }


    .recipe-comment-body,
    .recipe-comment-deleted {
        padding: 13px 14px;

        border-radius:
            14px 14px 14px 5px;

        font-size: 14px;
        line-height: 1.52;
    }


    .recipe-comment-actions {
        gap: 13px;

        margin-top: 6px;
    }


    .recipe-comment-replies {
        margin-left: 9px;

        padding-left: 18px;
    }


    .recipe-comment-reply
    .recipe-comment-time {
        margin-left: 0;
    }
}

/* ZAPECHKA_RECIPE_COLLECTION_LINKS_V1 */

.recipe-collection-links {
    margin-top: 4px;
    margin-bottom: 34px;
}

.recipe-collection-links-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 17px 19px;
    border: 1px solid rgba(120, 83, 59, 0.13);
    border-radius: 18px;
    background: rgba(255, 250, 246, 0.78);
}

.recipe-collection-links-title {
    margin: 0;
    color: #77635a;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

.recipe-collection-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recipe-collection-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid rgba(201, 79, 46, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #a8452b;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
    transition:
        transform 150ms ease,
        border-color 150ms ease,
        background 150ms ease;
}

.recipe-collection-link:hover {
    transform: translateY(-1px);
    border-color: rgba(201, 79, 46, 0.38);
    background: #fff;
}

.recipe-collection-link:focus-visible {
    outline: 3px solid rgba(201, 79, 46, 0.22);
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .recipe-collection-links {
        margin-bottom: 26px;
    }

    .recipe-collection-links-inner {
        align-items: flex-start;
        padding: 15px;
    }

    .recipe-collection-links-title {
        width: 100%;
    }
}
