/* ============================================================
   AybBen Lab — Helpdesk theme CSS
   Parent: site:abn-v1 (brand CSS already loaded)
   ============================================================ */

/* ── Helpdesk-бар (поиск + кнопка заявки) ── */
.helpdesk-bar {
    background: var(--cream-soft);
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
}
.helpdesk-bar__inner {
    display: flex;
    align-items: center;
    gap: 16px;
}
.helpdesk-bar__search {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    max-width: 520px;
}
.helpdesk-bar__input {
    width: 100%;
    height: 40px;
    padding: 0 40px 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    font: inherit;
    font-size: 14px;
    color: var(--text);
    background: var(--white);
    outline: none;
    transition: border-color .2s;
}
.helpdesk-bar__input:focus {
    border-color: var(--terracotta);
}
.helpdesk-bar__search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-mute);
    display: flex;
    align-items: center;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}
.btn--sm {
    font-size: 13.5px;
    padding: 0 18px;
    height: 40px;
    white-space: nowrap;
}

/* ── Основная область контента ── */
.site-main {
    min-height: 60vh;
}
.h-main-wrapper {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: var(--gap-section) var(--pad-x);
}

/* ── Сайдбар с категориями FAQ ── */
.h-main-wrapper .h-sidebar-wrapper {
    width: 200px;
    padding-top: 0;
    margin-right: 40px;
    flex-shrink: 0;
}
.h-main-wrapper .h-sidebar-wrapper .menu-v {
    list-style: none;
    margin: 0;
    padding: 0;
}
.h-main-wrapper .h-sidebar-wrapper .menu-v li {
    border-radius: 6px;
    color: var(--text);
    transition: background .2s;
}
.h-main-wrapper .h-sidebar-wrapper .menu-v li:not(:last-child) {
    margin-bottom: 2px;
}
.h-main-wrapper .h-sidebar-wrapper .menu-v li a {
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    color: inherit;
    text-decoration: none;
}
.h-main-wrapper .h-sidebar-wrapper .menu-v li:hover {
    background: var(--cream-soft);
}
.h-main-wrapper .h-sidebar-wrapper .menu-v li.selected {
    background: var(--cream);
    font-weight: 600;
    color: var(--terracotta);
}

/* ── Область контента ── */
.h-main-wrapper .h-content-wrapper {
    min-width: 0;
    flex: 1;
}
.h-main-wrapper .h-content-wrapper iframe,
.h-main-wrapper .h-content-wrapper img {
    max-width: 100%;
}

/* ── Заголовки внутри helpdesk ── */
.h-content-wrapper h1 {
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 700;
    color: var(--graphite);
    margin: 0 0 24px;
}
.h-content-wrapper h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--graphite);
    margin: 32px 0 12px;
}
.h-content-wrapper h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 24px 0 8px;
}

/* ── FAQ ── */
.faq-category .answer {
    margin-bottom: 40px;
    margin-top: 0;
    color: var(--text-soft);
    line-height: 1.7;
}
.h-content-wrapper .collapsible li {
    border-bottom: 1px solid var(--line);
}
.h-content-wrapper .collapsible li a {
    display: block;
    padding: 14px 0;
    font-size: 15px;
    color: var(--text);
    font-weight: 500;
}
.h-content-wrapper .collapsible li a:hover {
    color: var(--terracotta);
}

/* ── Формы (wa-form) ── */
.wa-form {
    float: none !important;
}
.wa-form .wa-field {
    margin-bottom: 16px;
}
.wa-form .wa-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
    margin-bottom: 5px;
}
.wa-form .wa-value input[type='text'],
.wa-form .wa-value input[type='email'],
.wa-form .wa-value input[type='tel'],
.wa-form .wa-value textarea,
.wa-form .wa-value select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    font: inherit;
    font-size: 14px;
    color: var(--text);
    background: var(--white);
    box-sizing: border-box;
    outline: none;
    transition: border-color .2s;
}
.wa-form .wa-value input:focus,
.wa-form .wa-value textarea:focus {
    border-color: var(--terracotta);
}
.wa-form .wa-value textarea {
    min-height: 120px;
    resize: vertical;
}
.wa-form .wa-submit {
    margin-top: 20px;
}
.wa-form .wa-submit input[type='submit'],
.wa-form .wa-submit button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 28px;
    background: var(--terracotta);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.wa-form .wa-submit input[type='submit']:hover,
.wa-form .wa-submit button:hover {
    background: var(--terracotta-2);
}

/* ── "Создать заявку" — форма запроса ── */
.h-content-wrapper .welcome {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-soft);
}
.h-content-wrapper .welcome h1 {
    margin-bottom: 16px;
}

/* ── Поиск — страница результатов ── */
.h-content-wrapper .search-results .result {
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}
.h-content-wrapper .search-results .result h3 {
    margin: 0 0 6px;
}
.h-content-wrapper .search-results .result h3 a {
    color: var(--terracotta);
    font-weight: 600;
}

/* ── Главная страница helpdesk (home.html) ── */
.hd-home {
    max-width: 760px;
    margin: 0 auto;
}
.hd-home__hero {
    text-align: center;
    padding-bottom: var(--gap-section);
}
.hd-home__hero h1 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    color: var(--graphite);
    margin: 8px 0 16px;
}
.hd-home__lead {
    font-size: 17px;
    color: var(--text-soft);
    margin: 0;
    line-height: 1.6;
}

/* Карточки действий */
.hd-home__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: var(--gap-section);
}
.hd-action-card {
    display: flex;
    flex-direction: column;
    padding: 32px 28px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    text-decoration: none;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
    position: relative;
}
.hd-action-card:hover {
    border-color: var(--terracotta);
    box-shadow: 0 4px 20px rgba(184,87,66,.08);
}
.hd-action-card--primary {
    background: var(--graphite);
    border-color: var(--graphite);
    color: var(--white);
}
.hd-action-card--primary:hover {
    border-color: var(--graphite-2);
    background: var(--graphite-2);
    box-shadow: 0 4px 20px rgba(30,33,40,.15);
}
.hd-action-card__icon {
    margin-bottom: 20px;
    opacity: .75;
}
.hd-action-card h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    color: inherit;
}
.hd-action-card p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    opacity: .75;
    flex: 1;
}
.hd-action-card__arrow {
    display: inline-flex;
    margin-top: 20px;
    opacity: .6;
}

/* FAQ-блок */
.hd-home__faq {
    border-top: 1px solid var(--line);
    padding-top: var(--gap-section);
}
.hd-home__faq h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--graphite);
    margin: 0 0 20px;
}
.hd-home__faq-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.hd-home__faq-list li {
    border-bottom: 1px solid var(--line);
}
.hd-home__faq-list li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    font-size: 15px;
    color: var(--text);
    text-decoration: none;
    transition: color .2s;
}
.hd-home__faq-list li a:hover {
    color: var(--terracotta);
}
.hd-home__faq-name { flex: 1; }
.hd-home__faq-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-mute);
    background: var(--cream);
    border-radius: 20px;
    padding: 2px 9px;
}
.hd-home__faq-arrow { color: var(--text-mute); flex-shrink: 0; }

/* Без сайдбара — контент на всю ширину */
.h-main-wrapper--full .h-content-wrapper {
    padding: 0;
}

/* ── Десктоп: sidebar + content рядом ── */
@media (min-width: 761px) {
    .h-main-wrapper {
        display: flex;
        align-items: flex-start;
    }
}

/* ── Мобильный ── */
@media (max-width: 760px) {
    .h-main-wrapper {
        padding: 24px var(--pad-x);
    }
    .h-main-wrapper .h-sidebar-wrapper {
        width: 100%;
        margin-right: 0;
        margin-bottom: 24px;
    }
    .helpdesk-bar__inner {
        flex-wrap: wrap;
    }
    .helpdesk-bar__search {
        max-width: 100%;
        width: 100%;
    }
    .hd-home__actions {
        grid-template-columns: 1fr;
    }
}
