/* Product Q&A studio */

.pd-qa {
    --qa-ink: #1f2937;
    --qa-muted: #6b7280;
    --qa-line: #e7edf2;
    --qa-brand: #62a832;
    --qa-brand-deep: #3f7a18;
    display: grid;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.pd-qa-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.15rem;
    border-radius: 20px;
    border: 1px solid #dce9cf;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(143, 216, 79, .18), transparent 55%),
        linear-gradient(135deg, #f7fbf2, #fff);
}

.pd-qa-hero h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--qa-ink);
}

.pd-qa-hero p {
    margin: .35rem 0 0;
    color: var(--qa-muted);
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.7;
}

.pd-qa-hero__stat {
    text-align: center;
    min-width: 72px;
    padding: .55rem .7rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #d8efb8;
}

.pd-qa-hero__stat b {
    display: block;
    font-size: 1.2rem;
    color: var(--qa-brand-deep);
}

.pd-qa-hero__stat span {
    font-size: .72rem;
    font-weight: 800;
    color: var(--qa-muted);
}

.pd-qa-faq__label {
    font-size: .8rem;
    font-weight: 800;
    color: var(--qa-muted);
    margin-bottom: .45rem;
}

.pd-qa-composer {
    border: 1px solid var(--qa-line);
    border-radius: 18px;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .04);
}

.pd-qa-form__user,
.pd-qa-guest {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .85rem;
}

.pd-qa-form__user strong,
.pd-qa-guest strong {
    display: block;
    font-size: .92rem;
}

.pd-qa-form__user small,
.pd-qa-guest p {
    display: block;
    margin: .15rem 0 0;
    color: var(--qa-muted);
    font-size: .78rem;
    font-weight: 600;
}

.pd-qa-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #eef5e6;
    background: #f3f4f6;
    flex-shrink: 0;
}

.pd-qa-avatar.sm {
    width: 34px;
    height: 34px;
}

.pd-qa-form textarea {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: .85rem 1rem;
    resize: vertical;
    min-height: 96px;
    font: inherit;
    background: #fbfcfe;
}

.pd-qa-form textarea:focus {
    outline: none;
    border-color: #b7e08a;
    box-shadow: 0 0 0 3px rgba(143, 216, 79, .18);
    background: #fff;
}

.pd-qa-form__row {
    margin-top: .75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.pd-qa-survey {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem .65rem;
}

.pd-qa-survey > span,
.pd-qa-survey-live > span {
    font-size: .78rem;
    font-weight: 800;
    color: var(--qa-muted);
}

.pd-qa-stars {
    display: inline-flex;
    gap: .15rem;
}

.pd-qa-stars button {
    border: 0;
    background: transparent;
    color: #d1d5db;
    font-size: 1.15rem;
    cursor: pointer;
    line-height: 1;
    transition: color .15s ease, transform .15s ease;
}

.pd-qa-stars button.is-on,
.pd-qa-stars button.is-hover {
    color: #f59e0b;
    transform: translateY(-1px);
}

.pd-qa-stars.is-compact button { font-size: 1rem; }

.pd-qa-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: .6rem 1.1rem;
    background: linear-gradient(180deg, #8fd84f, #62a832);
    color: #fff;
    font-weight: 800;
    font-size: .84rem;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(98, 168, 50, .22);
}

.pd-qa-submit:disabled { opacity: .6; cursor: wait; }

.pd-qa-msg {
    margin-top: .55rem;
    font-size: .8rem;
    font-weight: 700;
    min-height: 1.2em;
}
.pd-qa-msg.is-ok { color: var(--qa-brand-deep); }
.pd-qa-msg.is-err { color: #be123c; }

.pd-qa-guest {
    justify-content: space-between;
    flex-wrap: wrap;
}

.pd-qa-list {
    display: grid;
    gap: .85rem;
}

.pd-qa-card {
    border: 1px solid var(--qa-line);
    border-radius: 18px;
    background: #fff;
    padding: 1rem;
    animation: pdQaIn .4s ease both;
    animation-delay: calc(var(--i, 0) * 40ms);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.pd-qa-card:hover {
    border-color: #d8efb8;
    box-shadow: 0 12px 28px rgba(98, 168, 50, .08);
}

@keyframes pdQaIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.pd-qa-card__head {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: .7rem;
}

.pd-qa-card__meta {
    min-width: 0;
    flex: 1;
}

.pd-qa-card__meta strong {
    display: block;
    font-size: .9rem;
}

.pd-qa-card__meta time {
    font-size: .74rem;
    color: var(--qa-muted);
    font-weight: 600;
}

.pd-qa-badge {
    font-size: .72rem;
    font-weight: 800;
    padding: .2rem .55rem;
    border-radius: 999px;
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.pd-qa-badge.is-ok {
    background: #f3faeb;
    color: var(--qa-brand-deep);
    border-color: #d8efb8;
}

.pd-qa-card__body {
    margin: 0;
    color: #334155;
    font-size: .92rem;
    line-height: 1.85;
    font-weight: 600;
    white-space: pre-wrap;
}

.pd-qa-toolbar {
    margin-top: .85rem;
    padding-top: .75rem;
    border-top: 1px dashed #e8eee3;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem .75rem;
}

.pd-qa-votes {
    display: inline-flex;
    gap: .35rem;
}

.pd-qa-vote {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 999px;
    padding: .32rem .65rem;
    color: #64748b;
    font-weight: 800;
    font-size: .78rem;
    cursor: pointer;
    transition: .15s ease;
}

.pd-qa-vote:hover:not(:disabled) {
    border-color: #cfe8b0;
    color: var(--qa-brand-deep);
}

.pd-qa-vote.is-on {
    border-color: #b7e08a;
    background: #f3faeb;
    color: var(--qa-brand-deep);
}

.pd-qa-vote.is-down.is-on {
    border-color: #fecaca;
    background: #fff1f2;
    color: #be123c;
}

.pd-qa-vote:disabled { opacity: .55; cursor: not-allowed; }

.pd-qa-survey-live {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .25rem .55rem;
    border-radius: 999px;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.pd-qa-toggle {
    margin-inline-start: auto;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 999px;
    padding: .35rem .75rem;
    font-size: .78rem;
    font-weight: 800;
    color: #475569;
    cursor: pointer;
}

.pd-qa-toggle.is-open {
    background: #f3faeb;
    border-color: #d8efb8;
    color: var(--qa-brand-deep);
}

.pd-qa-thread {
    margin-top: .85rem;
    padding: .85rem;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    animation: pdQaIn .25s ease;
}

.pd-qa-replies {
    display: grid;
    gap: .7rem;
    margin-bottom: .75rem;
}

.pd-qa-reply {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: .55rem;
}

.pd-qa-reply__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .55rem;
    margin-bottom: .2rem;
}

.pd-qa-reply__top strong { font-size: .84rem; }
.pd-qa-reply__top em {
    font-style: normal;
    font-size: .7rem;
    font-weight: 800;
    color: var(--qa-brand-deep);
    background: #f3faeb;
    border: 1px solid #d8efb8;
    border-radius: 999px;
    padding: .1rem .45rem;
}
.pd-qa-reply__top time {
    font-size: .72rem;
    color: var(--qa-muted);
    font-weight: 600;
}
.pd-qa-reply p {
    margin: 0;
    font-size: .86rem;
    line-height: 1.75;
    color: #334155;
    font-weight: 600;
    white-space: pre-wrap;
}
.pd-qa-reply.is-official {
    padding: .55rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #d8efb8;
}

.pd-qa-reply-form {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: .45rem;
    align-items: center;
}

.pd-qa-reply-form input {
    margin: 0 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 999px !important;
    padding: .55rem .9rem !important;
    background: #fff !important;
}

.pd-qa-reply-form button {
    border: 0;
    border-radius: 999px;
    padding: .55rem .9rem;
    background: #62a832;
    color: #fff;
    font-weight: 800;
    font-size: .78rem;
    cursor: pointer;
}

.pd-qa-thread-guest {
    font-size: .8rem;
    font-weight: 700;
    color: var(--qa-muted);
}

.pd-qa-thread-guest a { color: var(--qa-brand-deep); }

.pd-qa-empty {
    text-align: center;
    padding: 1.6rem 1rem;
    border: 1px dashed #d8efb8;
    border-radius: 16px;
    background: #fbfef8;
    color: var(--qa-muted);
}

.pd-qa-empty strong {
    display: block;
    color: var(--qa-ink);
    margin-bottom: .3rem;
}

.pd-composer-avatar-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #eef5e6;
    flex-shrink: 0;
}

.pd-review-user .av-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #eef5e6;
}

@media (max-width: 700px) {
    .pd-qa-hero { flex-direction: column; align-items: stretch; }
    .pd-qa-form__row { align-items: stretch; }
    .pd-qa-submit { width: 100%; }
    .pd-qa-toolbar { align-items: stretch; }
    .pd-qa-toggle { margin-inline-start: 0; width: 100%; }
    .pd-qa-reply-form {
        grid-template-columns: 34px minmax(0, 1fr);
    }
    .pd-qa-reply-form button {
        grid-column: 2;
    }
}
