/*==========================================
  Desiwood — FAQ / help centre page (resources/views/frontend/pages/faq.blade.php;
  behaviour in public/frontend/js/dw-help.js). The home page FAQ keeps its own
  component (dw-faq.css).

  Every rule is scoped to .dw-help and shares the visual language of the other
  redesigned pages: Inter, dark glass cards, orange-to-pink accents, and the
  header's container edges. Answers start closed; with JavaScript turned off,
  a <noscript> style in faq.blade.php opens them all.
==========================================*/

.dw-help {
    --dh2-card: rgba(255, 255, 255, .04);
    --dh2-line: rgba(255, 255, 255, .1);
    --dh2-line-strong: rgba(255, 255, 255, .2);
    --dh2-text: #fff;
    --dh2-muted: #a9a3b8;
    --dh2-accent: #ff8a00;
    --dh2-accent-2: #ff006e;
    --dh2-gradient: linear-gradient(90deg, var(--dh2-accent) 0%, var(--dh2-accent-2) 100%);
    --dh2-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --dh2-fast: .25s;
    position: relative;
    isolation: isolate;
    font-family: "Inter", var(--default-font, "Poppins"), sans-serif;
    color: var(--dh2-text);
}

.dw-help a:focus-visible,
.dw-help button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #0b0712, 0 0 0 4px rgba(255, 138, 0, .9);
}

/* ---------- Hero + search ---------- */

.dw-help__hero {
    position: relative;
    /* Clears the fixed site header (88px). */
    padding: 150px 0 56px;
}

.dw-help__hero::before {
    content: "";
    position: absolute;
    top: 40px;
    left: 50%;
    z-index: -1;
    width: min(1200px, 130vw);
    height: 620px;
    transform: translateX(-50%);
    background:
        radial-gradient(38% 42% at 50% 30%, rgba(170, 40, 220, .3), transparent 70%),
        radial-gradient(36% 46% at 28% 55%, rgba(255, 120, 0, .14), transparent 70%),
        radial-gradient(40% 50% at 74% 55%, rgba(255, 0, 110, .16), transparent 70%);
    filter: blur(30px);
    pointer-events: none;
}

.dw-help__hero-inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.dw-help__eyebrow {
    margin: 0 0 16px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .2em;
    line-height: 1;
    text-transform: uppercase;
    color: #ff9d3d;
}

.dw-help__title {
    margin: 0;
    font-family: inherit;
    font-size: clamp(40px, 5.6vw, 68px);
    font-weight: 700;
    letter-spacing: -.045em;
    line-height: 1.02;
    color: var(--dh2-text);
}

.dw-help__title span {
    background: var(--dh2-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dw-help__lead {
    margin: 18px 0 0;
    font-size: 17.5px;
    line-height: 1.6;
    color: var(--dh2-muted);
}

.dw-help__search {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 620px;
    height: 60px;
    margin: 34px auto 0;
    border: 1px solid var(--dh2-line-strong);
    border-radius: 16px;
    background: rgba(255, 255, 255, .05);
    box-shadow: 0 20px 50px -24px rgba(0, 0, 0, .9);
    transition: border-color var(--dh2-fast) var(--dh2-ease), box-shadow var(--dh2-fast) var(--dh2-ease), background-color var(--dh2-fast) var(--dh2-ease);
}

.dw-help__search:focus-within {
    border-color: rgba(255, 138, 0, .7);
    background: rgba(255, 255, 255, .07);
    box-shadow: 0 0 0 4px rgba(255, 138, 0, .14), 0 20px 50px -24px rgba(0, 0, 0, .9);
}

.dw-help__search-icon {
    position: absolute;
    left: 20px;
    font-size: 21px;
    color: #8c859c;
    pointer-events: none;
}

.dw-help__search-input {
    width: 100%;
    height: 100%;
    padding: 0 54px 0 54px;
    border: 0;
    border-radius: inherit;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 16px;
    color: var(--dh2-text);
}

.dw-help__search-input::placeholder {
    color: #6f6880;
}

/* Keep the browser's own clear button out of the way of the "/" hint. */
.dw-help__search-input::-webkit-search-cancel-button {
    filter: invert(1) opacity(.5);
}

.dw-help__kbd {
    position: absolute;
    right: 16px;
    display: grid;
    place-items: center;
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    border: 1px solid var(--dh2-line-strong);
    border-radius: 7px;
    background: rgba(255, 255, 255, .04);
    font-family: inherit;
    font-size: 13px;
    color: #8c859c;
}

.dw-help__search:focus-within .dw-help__kbd {
    display: none;
}

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

.dw-help__body {
    padding: 24px 0 110px;
}

.dw-help__layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

/* ---------- Sidebar ---------- */

.dw-help__aside {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dw-help__aside-label {
    margin: 0 0 10px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #7f7890;
}

.dw-help__topics ul,
.dw-help__links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dw-help__topic {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: none;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 500;
    text-align: left;
    color: #cfc9d9;
    cursor: pointer;
    transition: background-color var(--dh2-fast) var(--dh2-ease), color var(--dh2-fast) var(--dh2-ease), border-color var(--dh2-fast) var(--dh2-ease);
}

.dw-help__topic:hover {
    background: rgba(255, 255, 255, .04);
    color: #fff;
}

.dw-help__topic.is-active {
    border-color: rgba(255, 138, 0, .3);
    background: linear-gradient(90deg, rgba(255, 138, 0, .14), rgba(255, 0, 110, .1));
    color: #fff;
}

.dw-help__count {
    min-width: 26px;
    padding: 2px 8px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .07);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    color: #a9a3b8;
}

.dw-help__topic.is-active .dw-help__count {
    background: var(--dh2-gradient);
    color: #fff;
}

.dw-help__support {
    padding: 24px;
    border: 1px solid rgba(255, 138, 0, .22);
    border-radius: 20px;
    background:
        radial-gradient(90% 80% at 100% 0%, rgba(255, 0, 110, .2), transparent 60%),
        radial-gradient(80% 80% at 0% 100%, rgba(255, 138, 0, .16), transparent 60%),
        #160b24;
}

.dw-help__support-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 138, 0, .3);
    border-radius: 13px;
    background: linear-gradient(160deg, rgba(255, 138, 0, .16), rgba(255, 0, 110, .14));
    font-size: 20px;
    color: #ffc58f;
}

.dw-help__support h2 {
    margin: 16px 0 6px;
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--dh2-text);
}

.dw-help__support p {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--dh2-muted);
}

.dw-help__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 20px;
    border-radius: 12px;
    background: var(--dh2-gradient);
    box-shadow: 0 12px 30px -12px rgba(255, 40, 100, .6);
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: filter var(--dh2-fast) var(--dh2-ease);
}

.dw-help__btn:hover {
    filter: brightness(1.08);
    color: #fff;
}

.dw-help__links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    color: #cfc9d9;
    text-decoration: none;
    transition: background-color var(--dh2-fast) var(--dh2-ease), color var(--dh2-fast) var(--dh2-ease);
}

.dw-help__links a:hover {
    background: rgba(255, 255, 255, .04);
    color: #fff;
}

.dw-help__links i {
    font-size: 17px;
    color: #ffb36b;
}

.dw-help__links .dw-help__links-arrow {
    margin-left: auto;
    font-size: 15px;
    color: #6f6880;
}

/* ---------- Questions ---------- */

.dw-help__status {
    margin: 0 0 14px;
    font-size: 13.5px;
    color: #8c859c;
}

.dw-help__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dw-help__item {
    border: 1px solid var(--dh2-line);
    border-radius: 18px;
    background: var(--dh2-card);
    /* Deep links (#faq-…) land below the fixed header. */
    scroll-margin-top: 110px;
    transition: border-color var(--dh2-fast) var(--dh2-ease), background-color var(--dh2-fast) var(--dh2-ease);
}

.dw-help__item:hover {
    border-color: var(--dh2-line-strong);
}

.dw-help__item.is-open {
    border-color: rgba(255, 138, 0, .35);
    background: linear-gradient(180deg, rgba(255, 138, 0, .06), rgba(255, 0, 110, .03)), var(--dh2-card);
}

.dw-help__item[hidden] {
    display: none;
}

.dw-help__q {
    margin: 0;
    font-family: inherit;
    font-size: inherit;
}

.dw-help__toggle {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 20px 22px;
    border: 0;
    border-radius: 18px;
    background: none;
    font-family: inherit;
    text-align: left;
    color: var(--dh2-text);
    cursor: pointer;
}

.dw-help__q-text {
    flex: 1 1 auto;
    font-size: 16.5px;
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.4;
}

.dw-help__q-text mark,
.dw-help__a-body mark {
    padding: 0 2px;
    border-radius: 3px;
    background: rgba(255, 138, 0, .3);
    color: #fff;
}

.dw-help__chev {
    display: grid;
    place-items: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border: 1px solid var(--dh2-line);
    border-radius: 50%;
    font-size: 18px;
    color: #cfc9d9;
    transition: transform var(--dh2-fast) var(--dh2-ease), background-color var(--dh2-fast) var(--dh2-ease), border-color var(--dh2-fast) var(--dh2-ease);
}

.dw-help__item.is-open .dw-help__chev {
    border-color: transparent;
    background: var(--dh2-gradient);
    color: #fff;
    transform: rotate(45deg);
}

/* Height animation with a grid row, no measuring in JS. */
.dw-help__a {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .35s var(--dh2-ease);
}

.dw-help__item.is-open .dw-help__a {
    grid-template-rows: 1fr;
}

.dw-help__a-inner {
    min-height: 0;
    overflow: hidden;
}

.dw-help__a-body {
    padding: 0 22px 22px;
    font-size: 15px;
    line-height: 1.7;
    color: #c9c3d4;
}

.dw-help__a-body p {
    margin: 0 0 12px;
}

.dw-help__a-body ul {
    margin: 0 0 12px;
    padding-left: 20px;
}

.dw-help__a-body li {
    margin-bottom: 4px;
}

.dw-help__a-body li::marker {
    color: #ff9d3d;
}

.dw-help__a-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--dh2-line);
}

.dw-help__tag {
    padding: 4px 10px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .06);
    font-size: 12px;
    font-weight: 500;
    color: #a9a3b8;
}

.dw-help__copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #ffaa5c;
    text-decoration: none;
}

.dw-help__copy:hover {
    color: #fff;
}

/* ---------- Empty state ---------- */

.dw-help__empty {
    padding: 56px 24px;
    border: 1px dashed var(--dh2-line-strong);
    border-radius: 20px;
    text-align: center;
}

.dw-help__empty[hidden] {
    display: none;
}

.dw-help__empty-icon {
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    font-size: 26px;
    color: #ffb36b;
}

.dw-help__empty h2 {
    margin: 16px 0 6px;
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    color: var(--dh2-text);
}

.dw-help__empty p {
    margin: 0 0 20px;
    font-size: 15px;
    color: var(--dh2-muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 991.98px) {
    .dw-help__hero {
        padding: 124px 0 40px;
    }

    .dw-help__layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .dw-help__aside {
        position: static;
        display: contents;
    }

    /* Topics become a horizontal chip row above the questions. */
    .dw-help__topics {
        order: -1;
        margin: 0 -12px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .dw-help__topics::-webkit-scrollbar {
        display: none;
    }

    .dw-help__aside-label {
        display: none;
    }

    .dw-help__topics ul {
        flex-direction: row;
        gap: 8px;
        padding: 0 12px;
    }

    .dw-help__topic {
        width: auto;
        border-color: var(--dh2-line);
        white-space: nowrap;
    }

    .dw-help__support {
        order: 2;
    }

    .dw-help__links {
        order: 3;
    }
}

@media (max-width: 575.98px) {
    .dw-help__hero {
        padding: 112px 0 32px;
    }

    .dw-help__lead {
        font-size: 16px;
    }

    .dw-help__search {
        height: 54px;
    }

    .dw-help__kbd {
        display: none;
    }

    .dw-help__toggle {
        padding: 16px 16px;
    }

    .dw-help__q-text {
        font-size: 15.5px;
    }

    .dw-help__a-body {
        padding: 0 16px 18px;
    }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    .dw-help *,
    .dw-help *::before,
    .dw-help *::after {
        transition-duration: 0s !important;
    }
}
