/* /public_html/_stage-fh/home/ask/ask.css */

/* =========================
   Section - Ask AI
========================= */
@font-face {
    font-family: "FH-Yekan";
    src: url("/assets/fonts/yekan/iranyekanwebregular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "FH-Yekan";
    src: url("/assets/fonts/yekan/iranyekanwebmedium.woff") format("woff");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "FH-Yekan";
    src: url("/assets/fonts/yekan/iranyekanwebbold.woff") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

.fh-home-ask {
    position: relative;

    padding: 18px 0 48px;

    background: var(--fh-home-bg);

    font-family: "FH-Yekan", Vazirmatn, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
    word-spacing: 0.04em;

    isolation: isolate;
    overflow: hidden;
}

.fh-home-ask::before {
    content: "";
    position: absolute;
    right: max(22px, calc((100% - 1160px) / 2 + 22px));
    left: max(22px, calc((100% - 1160px) / 2 + 22px));
    bottom: 30px;
    z-index: 1;

    height: 1px;

    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            transparent 0%,
            rgba(47, 75, 67, 0.10) 18%,
            rgba(47, 174, 131, 0.18) 50%,
            rgba(47, 75, 67, 0.10) 82%,
            transparent 100%
        );
}

.fh-home-ask::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 19px;
    z-index: 2;

    width: 48px;
    height: 22px;

    border-radius: 999px;
    border: 1px solid rgba(47, 174, 131, 0.18);

    background:
        radial-gradient(circle at 50% 50%, var(--fh-home-green) 0 3px, transparent 3.8px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 250, 244, 0.94));

    box-shadow:
        0 8px 20px rgba(73, 67, 61, 0.055),
        inset 0 1px 0 rgba(255, 255, 255, 0.96);

    transform: translateX(-50%);

    pointer-events: none;
}

.fh-home-ask .fh-home-container {
    position: relative;
    z-index: 2;
}
.fh-home-ask__card {
    position: relative;

    min-height: 158px;
    padding: 26px 28px;

    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 26px;

    border-radius: 34px;
    border: 1px solid rgba(212, 204, 195, 0.82);

    background:
        radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.70), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 254, 251, 0.98));

    box-shadow:
        0 10px 26px rgba(73, 67, 61, 0.052),
        inset 0 1px 0 rgba(255, 255, 255, 0.96);

    overflow: hidden;
}

.fh-home-ask__card::before {
    content: "?";
    position: absolute;
    left: 30px;
    top: -34px;

    color: rgba(233, 111, 131, 0.075);

    font-size: 150px;
    font-weight: 800;
    line-height: 1;
}

.fh-home-ask__content,
.fh-home-ask__action {
    position: relative;
    z-index: 1;
}

.fh-home-ask__eyebrow {
    width: fit-content;
    padding: 7px 13px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;
    border: 1px solid rgba(233, 111, 131, 0.16);
    background: rgba(255, 255, 255, 0.72);
    color: var(--fh-home-pink-dark);

    font-size: 11px;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: 0;
    word-spacing: 0.04em;
}

.fh-home-ask__title {
    max-width: 640px;
    margin: 12px 0 0;

    color: var(--fh-home-ink);

    font-size: clamp(24px, 3vw, 36px);
    font-weight: 800;
    line-height: 1.85;
    letter-spacing: 0;
    word-spacing: 0.04em;
}

.fh-home-ask__text {
    max-width: 620px;
    margin: 9px 0 0;

    color: var(--fh-home-muted);

    font-size: 13px;
    font-weight: 600;
    line-height: 2.15;
    letter-spacing: 0;
    word-spacing: 0.04em;
}

.fh-home-ask__action {
    min-width: 210px;

    display: grid;
    justify-items: center;
    gap: 10px;
}

.fh-home-ask__note {
    margin: 0;

    color: var(--fh-home-muted);

    font-size: 12px;
    font-weight: 600;
    line-height: 1.95;
    letter-spacing: 0;
    word-spacing: 0.04em;
    text-align: center;
}

.fh-home-ask__button {
    min-width: 174px;
    min-height: 48px;
    padding: 0 22px;

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

    border: 0;
    border-radius: 999px;

    background: linear-gradient(135deg, var(--fh-home-green), #269a72);
    color: #ffffff;

    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    word-spacing: 0.04em;

    cursor: pointer;

    box-shadow:
        0 14px 28px rgba(47, 174, 131, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);

    transition:
        transform 180ms ease,
        box-shadow 180ms ease;
}

.fh-home-ask__button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 18px 34px rgba(47, 174, 131, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

/* Modal */

.fh-home-ask-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: grid;
    place-items: center;

    padding: 18px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    font-family: "FH-Yekan", Vazirmatn, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
    word-spacing: 0.04em;

    transition:
        opacity 180ms ease,
        visibility 180ms ease;
}

.fh-home-ask-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.fh-home-ask-modal__backdrop {
    position: absolute;
    inset: 0;

    background: rgba(47, 75, 67, 0.28);
    backdrop-filter: blur(10px);
}

.fh-home-ask-modal__dialog {
    position: relative;
    z-index: 1;

    width: min(100%, 430px);
    height: min(680px, calc(100vh - 36px));

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

    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.72);

    background:
        radial-gradient(circle at 10% 10%, rgba(233, 111, 131, 0.075), transparent 30%),
        #fffefb;

    box-shadow:
        0 28px 80px rgba(47, 75, 67, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.96);

    overflow: hidden;

    transform: translateY(14px) scale(0.98);
    transition: transform 180ms ease;
}

.fh-home-ask-modal.is-open .fh-home-ask-modal__dialog {
    transform: translateY(0) scale(1);
}

.fh-home-ask-modal__head {
    min-height: 74px;
    padding: 14px 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    border-bottom: 1px solid rgba(230, 223, 215, 0.78);
    background: rgba(255, 255, 255, 0.64);
}

.fh-home-ask-modal__coach {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fh-home-ask-modal__avatar {
    position: relative;

    width: 44px;
    height: 44px;
    flex: 0 0 44px;

    display: grid;
    place-items: center;

    border-radius: 16px;
    border: 1px solid rgba(47, 174, 131, 0.12);

    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 255, 251, 0.92));
    color: var(--fh-home-ink);

    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;

    box-shadow:
        0 8px 18px rgba(47, 75, 67, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.96);

    overflow: hidden;
}

.fh-home-ask-modal__avatar-text {
    position: relative;
    z-index: 1;
}

.fh-home-ask-modal__logo {
    position: absolute;
    left: 50%;
    top: 55%;

    z-index: 2;

    display: block;

    width: 135%;
    height: 135%;

    object-fit: contain;
    object-position: center;

    padding: 4px;

    transform: translate(-50%, -50%);
}

.fh-home-ask-modal__title {
    margin: 0;

    color: var(--fh-home-ink);

    font-size: 13px;
    font-weight: 800;
    line-height: 1.75;
    letter-spacing: 0;
    word-spacing: 0.04em;
}

.fh-home-ask-modal__status {
    margin: 1px 0 0;

    color: var(--fh-home-green);

    font-size: 10.5px;
    font-weight: 650;
    line-height: 1.65;
    letter-spacing: 0;
    word-spacing: 0.04em;
}

.fh-home-ask-modal__close {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border: 0;
    border-radius: 999px;

    background: rgba(47, 75, 67, 0.07);
    color: var(--fh-home-ink);

    font-family: inherit;
    font-size: 24px;
    font-weight: 500;
    line-height: 1;

    cursor: pointer;
}

.fh-home-ask-modal__body {
    min-height: 0;
    padding: 16px;

    display: flex;
    flex-direction: column;
    gap: 10px;

    direction: ltr;

    overflow-y: auto;
    scroll-behavior: smooth;
}

.fh-home-ask-modal__message {
    max-width: 86%;

    display: flex;

    direction: rtl;
}

.fh-home-ask-modal__message p {
    margin: 0;
    padding: 11px 13px;

    border-radius: 18px;

    font-size: 12px;
    font-weight: 600;
    line-height: 2.15;
    letter-spacing: 0;
    word-spacing: 0.04em;
}

.fh-home-ask-modal__message--bot {
    align-self: flex-start;
}

.fh-home-ask-modal__message--bot p {
    border-bottom-right-radius: 7px;

    background: rgba(220, 238, 231, 0.72);
    color: #285f4e;
}

.fh-home-ask-modal__message--user {
    align-self: flex-end;
}

.fh-home-ask-modal__message--user p {
    border-bottom-left-radius: 7px;

    background: linear-gradient(135deg, var(--fh-home-pink), var(--fh-home-pink-dark));
    color: #ffffff;
}

.fh-home-ask-modal__message--loading p {
    min-width: 76px;
}

.fh-home-ask-modal__dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.fh-home-ask-modal__dots span {
    width: 5px;
    height: 5px;

    display: block;

    border-radius: 999px;
    background: currentColor;

    opacity: 0.45;
    animation: fhHomeAskDot 900ms ease-in-out infinite;
}

.fh-home-ask-modal__dots span:nth-child(2) {
    animation-delay: 120ms;
}

.fh-home-ask-modal__dots span:nth-child(3) {
    animation-delay: 240ms;
}

.fh-home-ask-modal__suggestions {
    padding: 0 14px 12px;

    display: flex;
    gap: 8px;

    overflow-x: auto;
    scrollbar-width: none;
}

.fh-home-ask-modal__suggestions::-webkit-scrollbar {
    display: none;
}

.fh-home-ask-modal__suggestions button {
    min-height: 34px;
    padding: 0 12px;

    flex: 0 0 auto;

    border: 1px solid rgba(47, 75, 67, 0.10);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.76);
    color: var(--fh-home-ink);

    font-family: inherit;
    font-size: 10.8px;
    font-weight: 650;
    line-height: 1;
    letter-spacing: 0;
    word-spacing: 0.04em;

    cursor: pointer;
}

.fh-home-ask-modal__form {
    padding: 12px;

    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;

    border-top: 1px solid rgba(230, 223, 215, 0.78);
    background: rgba(255, 255, 255, 0.70);
}

.fh-home-ask-modal__input {
    width: 100%;
    max-height: 110px;
    min-height: 42px;
    padding: 11px 13px;

    resize: none;

    border: 1px solid rgba(47, 75, 67, 0.10);
    border-radius: 18px;
    outline: none;

    background: #ffffff;
    color: var(--fh-home-ink);

    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.9;
    letter-spacing: 0;
    word-spacing: 0.04em;
}

.fh-home-ask-modal__input::placeholder {
    color: rgba(111, 125, 120, 0.76);
    font-weight: 500;
}

.fh-home-ask-modal__input:focus {
    border-color: rgba(47, 174, 131, 0.35);
    box-shadow: 0 0 0 4px rgba(47, 174, 131, 0.08);
}

.fh-home-ask-modal__send {
    min-width: 72px;
    height: 42px;
    padding: 0 14px;

    border: 0;
    border-radius: 16px;

    background: var(--fh-home-green);
    color: #ffffff;

    font-family: inherit;
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
    letter-spacing: 0;
    word-spacing: 0.04em;

    cursor: pointer;
}

.fh-home-ask-modal__send:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@keyframes fhHomeAskDot {
    0%,
    100% {
        transform: translateY(0);
        opacity: 0.35;
    }

    50% {
        transform: translateY(-3px);
        opacity: 0.9;
    }
}

@media (max-width: 900px) {
    .fh-home-ask {
        padding: 8px 0 62px;
    }

    .fh-home-ask__card {
        padding: 22px 16px 18px;

        grid-template-columns: 1fr;
        gap: 18px;

        border-radius: 28px;

        text-align: center;
    }

    .fh-home-ask__eyebrow {
        margin-inline: auto;

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

    .fh-home-ask__title {
        max-width: 330px;
        margin: 10px auto 0;

        font-size: 17px;
        font-weight: 800;
        line-height: 1.9;
        letter-spacing: 0;
        word-spacing: 0.04em;
    }

    .fh-home-ask__text {
        max-width: 330px;
        margin: 8px auto 0;

        font-size: 12px;
        font-weight: 600;
        line-height: 2.15;
        letter-spacing: 0;
        word-spacing: 0.04em;
    }

    .fh-home-ask__action {
        min-width: 0;
    }

    .fh-home-ask__note {
        font-size: 11.5px;
        font-weight: 600;
        line-height: 1.95;
    }

    .fh-home-ask__button {
        min-width: 168px;
        min-height: 45px;

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

    .fh-home-ask-modal {
        align-items: end;

        padding: 10px;
    }

    .fh-home-ask-modal__dialog {
        width: 100%;
        height: min(680px, calc(100vh - 20px));

        border-radius: 28px;
    }

    .fh-home-ask-modal__message {
        max-width: 90%;
    }

    .fh-home-ask-modal__message p {
        font-size: 11.8px;
        font-weight: 600;
        line-height: 2.15;
    }
}