/* =========================================================
   HBS Garage · Nachbarschaftshilfe · Unterhaltung V2
   ========================================================= */

.help-talk-page {
    display: grid;
    gap: 17px;
    padding: 10px 0 48px;
}


/* ---------- Zurück ---------- */

.help-talk-back {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 7px;

    color: #38604a;

    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.help-talk-back:hover {
    color: #075d37;
}


/* ---------- Layout ---------- */

.help-talk-layout {
    display: grid;

    grid-template-columns:
        minmax(260px, .68fr)
        minmax(0, 1.55fr);

    gap: 18px;
    align-items: start;
}


/* =========================================================
   Anfrage links
   ========================================================= */

.help-talk-context {
    position: sticky;
    top: 94px;

    overflow: hidden;

    border: 1px solid #e1e8e3;
    border-radius: 20px;

    background: #fff;

    box-shadow:
        0 10px 30px
        rgba(27, 54, 38, .04);
}

.help-talk-context-top {
    padding: 22px;
}

.help-talk-context-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;

    margin-bottom: 22px;
}

.help-talk-eyebrow {
    display: block;

    color: #34714b;

    font-size: 10px;
    font-weight: 900;
    letter-spacing: .085em;
    text-transform: uppercase;
}

.help-talk-context h1 {
    margin: 7px 0 16px;

    color: #172b21;

    font-size: clamp(23px, 3vw, 30px);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.help-talk-context-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.help-talk-context-facts > div {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: 6px 8px;

    border-radius: 9px;

    background: #f4f7f4;
    color: #596b61;

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

.help-talk-context-description {
    display: -webkit-box;
    overflow: hidden;

    margin: 18px 0 0;

    color: #596960;

    font-size: 12px;
    line-height: 1.55;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
}


/* ---------- Helferauswahl ---------- */

.help-talk-select-helper,
.help-talk-selected {
    margin: 0 14px 14px;
    padding: 14px;

    border-radius: 14px;
}

.help-talk-select-helper {
    border: 1px solid #dfe8e1;
    background: #f8faf8;
}

.help-talk-select-helper > strong {
    display: block;

    margin-top: 5px;

    color: #263f31;

    font-size: 13px;
}

.help-talk-select-helper > p {
    margin: 5px 0 12px;

    color: #718078;

    font-size: 11px;
    line-height: 1.45;
}

.help-talk-select-helper form {
    margin: 0;
}

.help-talk-select-helper .btn {
    width: 100%;
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    font-size: 11px;
}

.help-talk-selected {
    display: grid;

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

    gap: 10px;

    border: 1px solid #d5e8d7;

    background: #f0f8f1;
}

.help-talk-selected > span {
    display: grid;

    width: 35px;
    height: 35px;

    place-items: center;

    border-radius: 50%;

    background: #dcefdc;
    color: #176c3b;

    font-weight: 900;
}

.help-talk-selected strong {
    display: block;

    color: #294b35;

    font-size: 12px;
}

.help-talk-selected p {
    margin: 3px 0 0;

    color: #617568;

    font-size: 10px;
    line-height: 1.4;
}


/* ---------- Detail-Link ---------- */

.help-talk-detail-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    padding: 14px 20px;

    border-top: 1px solid #edf0ee;

    color: #38604a;

    font-size: 11px;
    font-weight: 850;
    text-decoration: none;
}

.help-talk-detail-link:hover {
    background: #fafcfa;
    color: #075d37;
}


/* =========================================================
   Chat
   ========================================================= */

.help-talk-chat {
    min-width: 0;

    overflow: hidden;

    border: 1px solid #dfe6e1;
    border-radius: 20px;

    background: #fff;

    box-shadow:
        0 10px 32px
        rgba(27, 54, 38, .045);
}


/* ---------- Chat-Kopf ---------- */

.help-talk-header {
    display: flex;
    align-items: center;
    gap: 11px;

    min-height: 68px;

    padding: 12px 17px;

    border-bottom: 1px solid #e8ede9;

    background: #fff;
}

.help-talk-avatar,
.help-talk-message-avatar {
    display: grid;
    overflow: hidden;

    flex: 0 0 auto;

    place-items: center;

    border-radius: 50%;

    background: #e8f2e6;
    color: #075d37;

    font-weight: 850;
}

.help-talk-avatar {
    width: 42px;
    height: 42px;

    font-size: 13px;
}

.help-talk-avatar img,
.help-talk-message-avatar img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

.help-talk-header-copy {
    display: grid;

    min-width: 0;
    flex: 1;
}

.help-talk-header-copy strong {
    overflow: hidden;

    color: #1d3327;

    font-size: 13px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.help-talk-header-copy span {
    margin-top: 2px;

    color: #819087;

    font-size: 10px;
}

.help-talk-header-status {
    flex: 0 0 auto;

    padding: 6px 9px;

    border-radius: 999px;

    background: #eaf6eb;
    color: #267144;

    font-size: 9px;
    font-weight: 900;
}


/* ---------- Nachrichtenbereich ---------- */

.help-talk-messages {
    display: flex;
    flex-direction: column;
    gap: 14px;

    min-height: 430px;
    height: min(58vh, 620px);

    overflow-y: auto;

    padding: 20px;

    overscroll-behavior: contain;

    background:
        linear-gradient(
            180deg,
            #fafcfa 0%,
            #f7faf7 100%
        );
}

.help-talk-message {
    display: flex;
    align-items: flex-end;
    gap: 8px;

    width: 100%;
}

.help-talk-message.is-own {
    flex-direction: row-reverse;
}

.help-talk-message-avatar {
    width: 30px;
    height: 30px;

    font-size: 9px;
}

.help-talk-message-content {
    display: grid;

    max-width: min(72%, 610px);
}

.help-talk-message.is-own .help-talk-message-content {
    justify-items: end;
}

.help-talk-bubble {
    width: fit-content;

    padding: 10px 13px;

    border: 1px solid #e1e8e3;
    border-radius: 16px 16px 16px 5px;

    background: #fff;

    box-shadow:
        0 3px 10px
        rgba(31, 55, 40, .025);
}

.help-talk-message.is-own .help-talk-bubble {
    border-color: #cee3d2;

    border-radius: 16px 16px 5px 16px;

    background: #eaf5ec;
}

.help-talk-bubble p {
    margin: 0;

    color: #31473a;

    font-size: 13px;
    line-height: 1.5;

    overflow-wrap: anywhere;
}

.help-talk-message-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;

    margin-top: 4px;
    padding-inline: 3px;

    color: #8a968e;

    font-size: 9px;
}

.help-talk-message-meta strong {
    color: #65756c;

    font-weight: 750;
}


/* ---------- Leerer Chat ---------- */

.help-talk-empty {
    display: grid;

    max-width: 330px;

    margin: auto;
    padding: 40px 20px;

    justify-items: center;

    text-align: center;
}

.help-talk-empty-icon {
    display: grid;

    width: 48px;
    height: 48px;

    margin-bottom: 12px;

    place-items: center;

    border-radius: 15px;

    background: #eaf3e8;

    font-size: 20px;
}

.help-talk-empty strong {
    color: #30463a;

    font-size: 14px;
}

.help-talk-empty p {
    margin: 5px 0 0;

    color: #7b8981;

    font-size: 11px;
    line-height: 1.5;
}


/* ---------- Nachricht schreiben ---------- */

.help-talk-compose {
    display: grid;

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

    gap: 10px;
    align-items: end;

    padding: 13px;

    border-top: 1px solid #e7ece8;

    background: #fff;
}

.help-talk-compose-field {
    min-width: 0;
}

.help-talk-compose textarea {
    width: 100%;
    min-height: 48px;
    max-height: 150px;

    box-sizing: border-box;

    resize: vertical;

    padding: 12px 13px;

    border: 1px solid #dce4de;
    border-radius: 12px;

    background: #fafcfa;
    color: #263c30;

    font: inherit;
    font-size: 13px;
    line-height: 1.45;
}

.help-talk-compose textarea:focus {
    outline: none;

    border-color: #609a75;

    box-shadow:
        0 0 0 3px
        rgba(76, 110, 68, .1);

    background: #fff;
}

.help-talk-send {
    min-height: 48px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    white-space: nowrap;
}


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

@media (max-width: 900px) {

    .help-talk-layout {
        grid-template-columns: 1fr;
    }

    .help-talk-context {
        position: static;
    }

    .help-talk-context-description {
        -webkit-line-clamp: 3;
    }

    .help-talk-messages {
        height: min(55vh, 560px);
    }
}


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

@media (max-width: 640px) {

    .help-talk-page {
        gap: 12px;
        padding-top: 3px;
    }

    .help-talk-layout {
        gap: 12px;
    }

    .help-talk-context,
    .help-talk-chat {
        border-radius: 17px;
    }

    .help-talk-context-top {
        padding: 16px;
    }

    .help-talk-context-tags {
        margin-bottom: 15px;
    }

    .help-talk-context h1 {
        margin-bottom: 12px;

        font-size: 22px;
    }

    .help-talk-context-description {
        margin-top: 13px;

        -webkit-line-clamp: 2;
    }

    .help-talk-select-helper,
    .help-talk-selected {
        margin: 0 10px 10px;
    }

    .help-talk-detail-link {
        padding: 12px 16px;
    }

    .help-talk-header {
        min-height: 62px;

        padding: 10px 13px;
    }

    .help-talk-avatar {
        width: 38px;
        height: 38px;
    }

    .help-talk-messages {
        min-height: 330px;
        height: 52vh;

        padding: 14px 10px;
    }

    .help-talk-message {
        gap: 6px;
    }

    .help-talk-message-avatar {
        width: 27px;
        height: 27px;
    }

    .help-talk-message-content {
        max-width: 82%;
    }

    .help-talk-bubble {
        padding: 9px 11px;
    }

    .help-talk-bubble p {
        font-size: 12px;
    }

    .help-talk-compose {
        grid-template-columns: minmax(0, 1fr);

        gap: 7px;

        padding: 10px;
    }

    .help-talk-compose textarea {
        min-height: 47px;

        font-size: 16px;
    }

    .help-talk-send {
        width: 100%;
        min-height: 44px;
    }
}


@media (max-width: 420px) {

    .help-talk-context-facts {
        gap: 5px;
    }

    .help-talk-context-facts > div {
        padding: 5px 7px;
    }

    .help-talk-header-status {
        font-size: 0;
    }

    .help-talk-header-status::after {
        content: "✓";
        font-size: 11px;
    }
}
