/*
 * HelpSafe Law
 *
 * COMPONENTS
 *
 * Общие компоненты интерфейса.
 */


/* ============================================================
   SEARCH BUTTON IN HEADER
   ============================================================ */

.site-header__search {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;
    flex: 0 0 42px;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 10px;

    background: transparent;

    color: currentColor;
    text-decoration: none;

    font-size: 17px;
    line-height: 1;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

.site-header__search:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--law-primary, #189589);

    transform: translateY(-1px);
}

.site-header__search:focus-visible {
    outline: 3px solid rgba(24, 149, 137, 0.28);
    outline-offset: 2px;
}

.site-header__search i {
    display: block;
    margin: 0;
    padding: 0;

    line-height: 1;
}

/* ============================================================
   2. HERO SEARCH LINK
   ============================================================ */

.law-hero-search-link {
    display: flex;
    align-items: center;

    width: 100%;
    min-height: 70px;

    padding: 11px 17px;

    box-sizing: border-box;

    background: rgba(255, 253, 245, 0.97);

    border: 1px solid rgba(24, 149, 137, 0.18);
    border-radius: 14px;

    color: var(--law-text, #262424);
    text-decoration: none;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.08);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.law-hero-search-link:hover {
    transform: translateY(-2px);

    border-color: rgba(24, 149, 137, 0.35);

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.12);
}

.law-hero-search-link:focus-visible {
    outline: 3px solid rgba(24, 149, 137, 0.28);
    outline-offset: 3px;
}


/* Иконка */

.law-hero-search-link__icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 42px;

    width: 42px;
    height: 42px;

    margin-right: 14px;

    border-radius: 10px;

    background: var(--law-primary, #189589);
    color: #ffffff;

    font-size: 17px;
}


/* Текст */

.law-hero-search-link__content {
    display: flex;
    flex-direction: column;

    min-width: 0;
}

.law-hero-search-link__title {
    font-family: var(--law-font-heading, "Manrope", sans-serif);

    font-size: 16px;
    font-weight: 700;

    line-height: 1.25;
}

.law-hero-search-link__description {
    margin-top: 3px;

    color: rgba(38, 36, 36, 0.62);

    font-size: 13px;
    line-height: 1.35;
}


/* Стрелка */

.law-hero-search-link__arrow {
    flex: 0 0 auto;

    margin-left: auto;
    padding-left: 16px;

    color: var(--law-primary, #189589);

    font-size: 24px;
    line-height: 1;
}


/* ============================================================
   FULL SCREEN SEARCH PAGE
   ============================================================ */

body.page-template-page-search .site-header,
body.page-template-page-search .mobile-menu,
body.page-template-page-search .site-footer {
    display: none;
}


.hs-search-page {
    position: relative;

    min-height: 100vh;

    display: flex;
    align-items: flex-start;
    justify-content: center;

    box-sizing: border-box;

    padding: 0 20px;

    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.28),
            rgba(0, 0, 0, 0.28)
        ),
        url("/wp-content/themes/volunteer-low/assets/images/search.png");

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}


.hs-search-content {
    position: absolute;

    top: 68%;
    left: 50%;

    width: min(900px, calc(100% - 40px));

    transform: translate(-50%, -50%);

    text-align: center;
}


.hs-search-title {
    margin: 0 0 22px;

    color: #ffffff;

    font-family:
        var(--law-font-heading,
        "Manrope",
        sans-serif);

    font-size: clamp(27px, 4vw, 42px);

    font-weight: 700;
    line-height: 1.15;

    text-shadow:
        0 2px 12px rgba(0, 0, 0, 0.38);
}


/* ============================================================
   SEARCH FORM
   ============================================================ */

.hs-search-form {
    width: 100%;
}


.hs-search-input-wrap {
    display: flex;
    align-items: stretch;

    width: 100%;

    box-sizing: border-box;

    background: #fffdf5;

    border: 1px solid
        rgba(24, 149, 137, 0.20);

    border-radius: 14px;

    overflow: hidden;

    box-shadow:
        0 14px 40px rgba(0, 0, 0, 0.14);
}


/* ============================================================
   TEXTAREA
   ============================================================ */

.hs-search-input {
    flex: 1 1 auto;

    width: 100%;
    min-width: 0;

    min-height: 54px;
    max-height: 190px;

    box-sizing: border-box;

    margin: 0;
    padding: 14px 18px;

    border: 0;
    outline: 0;

    resize: none;

    overflow-y: auto;

    background: transparent;

    color: #262424;

    font-family:
        var(--law-font-body,
        "Inter",
        sans-serif);

    font-size: 16px;

    line-height: 1.45;
}


.hs-search-input::placeholder {
    color: rgba(38, 36, 36, 0.48);
}


.hs-search-input:focus {
    outline: none;
}


/* ============================================================
   SUBMIT BUTTON
   ============================================================ */

.hs-search-submit {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    flex: 0 0 auto;

    min-width: 170px;

    padding: 0 21px;

    border: 0;

    background:
        var(--law-primary,
        #189589);

    color: #ffffff;

    font-family:
        var(--law-font-heading,
        "Manrope",
        sans-serif);

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

    transition:
        background-color 0.2s ease;
}


.hs-search-submit:hover {
    background: #147d73;
}


.hs-search-submit:focus-visible {
    outline: 3px solid
        rgba(24, 149, 137, 0.28);

    outline-offset: -3px;
}


.hs-search-submit i {
    font-size: 13px;
}


/* ============================================================
   HINT
   ============================================================ */

.hs-search-hint {
    margin: 11px 0 0;

    color:
        rgba(255, 255, 255, 0.88);

    font-size: 13px;

    line-height: 1.45;

    text-shadow:
        0 1px 8px rgba(0, 0, 0, 0.35);
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 700px) {

    .hs-search-page {
        min-height: 100vh;

        padding: 0 14px;
    }


    .hs-search-content {
        top: 56%;

        width:
            calc(100% - 28px);
    }


    .hs-search-title {
        margin-bottom: 17px;

        font-size: 27px;
    }


    .hs-search-input-wrap {
        flex-direction: column;

        border-radius: 14px;
    }


    .hs-search-input {
        min-height: 56px;

        padding: 14px 16px;

        font-size: 15px;
    }


    .hs-search-submit {
        width: 100%;

        min-height: 50px;
    }


    .hs-search-hint {
        margin-top: 9px;

        font-size: 12px;
    }

}


/* ============================================================
   PRINT
   ============================================================ */

@media print {

    .hs-search-page {
        min-height: auto;

        background: #ffffff;
    }


    .hs-search-title {
        color: #262424;

        text-shadow: none;
    }


    .hs-search-hint {
        color: #262424;

        text-shadow: none;
    }

}

/* ============================================================
   4. SEARCH INPUT
   ============================================================ */

.hs-search-form {
    width: 100%;
}

.hs-search-input-wrap {
    display: flex;
    align-items: stretch;

    width: 100%;

    box-sizing: border-box;

    background: #fffdf5;

    border: 1px solid rgba(24, 149, 137, 0.20);
    border-radius: 15px;

    overflow: hidden;

    box-shadow:
        0 14px 40px rgba(0, 0, 0, 0.14);
}


/* Само поле */

.hs-search-input {
    flex: 1 1 auto;

    width: 100%;
    min-width: 0;

    min-height: 68px;
    max-height: 220px;

    box-sizing: border-box;

    padding: 17px 19px;

    border: 0;
    outline: 0;

    resize: none;

    overflow-y: auto;

    background: transparent;

    color: #262424;

    font-family: var(--law-font-body, "Inter", sans-serif);

    font-size: 16px;
    line-height: 1.45;
}

.hs-search-input::placeholder {
    color: rgba(38, 36, 36, 0.48);
}

.hs-search-input:focus {
    outline: none;
}


/* Кнопка */

.hs-search-submit {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    flex: 0 0 auto;

    min-width: 170px;

    padding: 0 21px;

    border: 0;

    background: var(--law-primary, #189589);
    color: #ffffff;

    font-family: var(--law-font-heading, "Manrope", sans-serif);

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background-color 0.2s ease;
}

.hs-search-submit:hover {
    background: #147d73;
}

.hs-search-submit:focus-visible {
    outline: 3px solid rgba(24, 149, 137, 0.28);
    outline-offset: -3px;
}

.hs-search-submit i {
    font-size: 13px;
}


/* Подсказка */

.hs-search-hint {
    margin: 12px 0 0;

    color: rgba(255, 255, 255, 0.88);

    font-size: 13px;
    line-height: 1.45;

    text-shadow:
        0 1px 8px rgba(0, 0, 0, 0.35);
}


/* ============================================================
   5. SEARCH RESULTS
   ============================================================ */

.hs-results-page {
    width: 100%;
}

.hs-results-query {
    margin-bottom: 28px;
}

.hs-engine {
    margin-bottom: 30px;
}

.hs-engine__steps {
    display: flex;
    flex-direction: column;

    gap: 8px;
}

.hs-result {
    margin-top: 30px;
}
/* ============================================================
   SEARCH RESULTS PAGE
   ============================================================ */

.hs-results-page {
    width: 78%;
	margin: auto;
    padding: 72px 0 100px;
    background: #fffdf5;
}

.hs-results-page .container {
    max-width: 920px;
}


/* ============================================================
   HEADER
   ============================================================ */

.hs-results-header {
    margin-bottom: 42px;
}

.hs-results-header__eyebrow {
    display: inline-flex;
    align-items: center;

    margin-bottom: 12px;

    color: #189589;

    font-size: 12px;
    font-weight: 800;
    line-height: 1;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hs-results-title {
    margin: 0;

    color: #262424;

    font-family:
        var(--law-font-heading,
        "Manrope",
        sans-serif);

    font-size: clamp(30px, 4vw, 46px);
    font-weight: 800;
    line-height: 1.12;

    letter-spacing: -0.025em;
}


/* ============================================================
   QUERY
   ============================================================ */

.hs-results-query {
    margin-top: 24px;
    padding: 18px 20px;

    border-left: 4px solid #189589;
    border-radius: 0 12px 12px 0;

    background: #f5faf8;
}

.hs-results-query__label {
    display: block;

    margin-bottom: 7px;

    color: #189589;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.hs-results-query__text {
    margin: 0;

    color: #3e3b3b;

    font-size: 16px;
    line-height: 1.6;
}


/* ============================================================
   ENGINE
   ============================================================ */

.hs-engine {
    margin-bottom: 34px;
    padding: 26px 28px;

    border: 1px solid rgba(38, 36, 36, 0.08);
    border-radius: 16px;

    background: #ffffff;

    box-shadow:
        0 7px 25px rgba(38, 36, 36, 0.045);
}

.hs-engine__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;
}

.hs-engine__eyebrow {
    display: block;

    margin-bottom: 6px;

    color: #189589;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.hs-engine__title {
    margin: 0;

    color: #262424;

    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
}

.hs-engine__status {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    flex: 0 0 auto;

    padding: 7px 10px;

    border-radius: 8px;

    background: #edf8f1;
    color: #2e7d52;

    font-size: 12px;
    font-weight: 700;
}

.hs-engine__status i {
    font-size: 10px;
}


/* ============================================================
   ENGINE STEPS
   ============================================================ */

.hs-engine__steps {
    display: flex;
    flex-direction: column;

    gap: 8px;
}

.hs-engine-step {
    display: flex;
    align-items: flex-start;

    gap: 12px;

    padding: 11px 12px;

    border-radius: 10px;

    background: #f7f8f7;
}

.hs-engine-step__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 27px;

    width: 27px;
    height: 27px;

    border-radius: 50%;

    background: #dfeae7;
    color: #65716e;

    font-size: 12px;
    font-weight: 800;
}

.hs-engine-step__content {
    display: flex;
    flex-direction: column;

    gap: 2px;

    min-width: 0;
}

.hs-engine-step__content strong {
    color: #343130;

    font-size: 13px;
    line-height: 1.35;
}

.hs-engine-step__content span {
    color: #777371;

    font-size: 12px;
    line-height: 1.45;
}

.hs-engine-step--done {
    background: #f2f8f6;
}

.hs-engine-step--done .hs-engine-step__number {
    background: #189589;
    color: #ffffff;
}

.hs-engine-step--partial {
    background: #fff9ed;
}

.hs-engine-step--partial .hs-engine-step__number {
    background: #e6c66b;
    color: #ffffff;
}

.hs-engine-step--next {
    opacity: 0.72;
}


/* ============================================================
   RESULT SECTIONS
   ============================================================ */

.hs-result {
    margin-top: 26px;
    padding: 30px 32px;

    border: 1px solid rgba(38, 36, 36, 0.08);
    border-radius: 16px;

    background: #ffffff;

    box-shadow:
        0 6px 24px rgba(38, 36, 36, 0.035);
}

.hs-result__heading {
    margin-bottom: 18px;
}

.hs-result__eyebrow {
    display: block;

    margin-bottom: 7px;

    color: #189589;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hs-result__title {
    margin: 0;

    color: #262424;

    font-size: 23px;
    font-weight: 800;
    line-height: 1.3;
}

.hs-result__text {
    margin: 0;

    color: #555252;

    font-size: 15px;
    line-height: 1.75;
}


/* ============================================================
   SUMMARY
   ============================================================ */

.hs-result--summary {
    border-top: 4px solid #189589;
}

.hs-result--summary .hs-result__title {
    font-size: clamp(24px, 3vw, 31px);
}


/* ============================================================
   IMPORTANT
   ============================================================ */

.hs-result--important {
    background: #fffdf5;
}

.hs-result--important .hs-result__title {
    font-size: 21px;
}


/* ============================================================
   FOUND RESULTS
   ============================================================ */

.hs-found-list {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 10px;
}

.hs-found-item {
    min-width: 0;

    padding: 15px 16px;

    border: 1px solid rgba(38, 36, 36, 0.07);
    border-radius: 11px;

    background: #fafbfa;
}

.hs-found-item__type {
    margin-bottom: 5px;

    color: #189589;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hs-found-item__title {
    margin: 0;

    color: #343130;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}


/* ============================================================
   PLACEHOLDER BLOCKS
   ============================================================ */

.hs-placeholder {
    display: flex;
    align-items: flex-start;

    gap: 13px;

    padding: 17px 18px;

    border-radius: 11px;

    background: #f7f8f7;
}

.hs-placeholder i {
    flex: 0 0 auto;

    margin-top: 3px;

    color: #189589;

    font-size: 16px;
}

.hs-placeholder p {
    margin: 0;

    color: #696665;

    font-size: 14px;
    line-height: 1.65;
}


/* ============================================================
   EMPTY
   ============================================================ */

.hs-results-empty {
    max-width: 680px;

    margin: 70px auto 0;
    padding: 45px 30px;

    text-align: center;

    border: 1px solid rgba(38, 36, 36, 0.08);
    border-radius: 17px;

    background: #ffffff;

    box-shadow:
        0 8px 30px rgba(38, 36, 36, 0.045);
}

.hs-results-empty__icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 54px;
    height: 54px;

    margin: 0 auto 18px;

    border-radius: 14px;

    background: #edf8f5;
    color: #189589;

    font-size: 19px;
}

.hs-results-empty h2 {
    margin: 0 0 10px;

    color: #262424;

    font-size: 24px;
    font-weight: 800;
}

.hs-results-empty p {
    max-width: 520px;

    margin: 0 auto 24px;

    color: #666260;

    font-size: 15px;
    line-height: 1.65;
}

.hs-results-empty__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding: 0 20px;

    border-radius: 10px;

    background: #189589;
    color: #ffffff;

    font-size: 14px;
    font-weight: 700;

    text-decoration: none;
}

.hs-results-empty__button:hover {
    background: #147d73;
    color: #ffffff;
}


/* ============================================================
   AGAIN
   ============================================================ */

.hs-results-again {
    margin-top: 38px;

    text-align: center;
}

.hs-results-again__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: #189589;

    font-size: 14px;
    font-weight: 700;

    text-decoration: none;
}

.hs-results-again__link:hover {
    color: #147d73;
    text-decoration: underline;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 700px) {

    .hs-results-page {
        padding: 48px 0 70px;
    }

    .hs-results-page .container {
        width: calc(100% - 28px);
    }

    .hs-results-header {
        margin-bottom: 28px;
    }

    .hs-results-query {
        margin-top: 18px;
        padding: 15px 16px;
    }

    .hs-engine {
        padding: 20px;
    }

    .hs-engine__header {
        flex-direction: column;
        gap: 12px;
    }

    .hs-engine__status {
        align-self: flex-start;
    }

    .hs-result {
        padding: 23px 20px;
    }

    .hs-found-list {
        grid-template-columns: 1fr;
    }

    .hs-results-empty {
        margin-top: 45px;
        padding: 36px 20px;
    }

}

/* ============================================================
   6. RESPONSIVE
   ============================================================ */

@media (max-width: 700px) {

    .law-hero-search-link {
        min-height: 62px;

        padding: 9px 13px;

        border-radius: 12px;
    }

    .law-hero-search-link__icon {
        flex-basis: 38px;

        width: 38px;
        height: 38px;

        margin-right: 11px;

        font-size: 15px;
    }

    .law-hero-search-link__title {
        font-size: 14px;
    }

    .law-hero-search-link__description {
        font-size: 12px;
    }

    .law-hero-search-link__arrow {
        padding-left: 10px;

        font-size: 21px;
    }


    /* SEARCH PAGE */

    .hs-search-page {
        min-height: 100vh;

        padding: 0 14px;
    }

    .hs-search-content {
        top: 68%;

        width: calc(100% - 28px);
    }

    .hs-search-brand {
        margin-bottom: 17px;
    }

    .hs-search-title {
        font-size: 27px;
    }

    .hs-search-input-wrap {
        flex-direction: column;

        border-radius: 14px;
    }

    .hs-search-input {
        min-height: 64px;

        padding: 15px 16px;

        font-size: 15px;
    }

    .hs-search-submit {
        width: 100%;
        min-height: 50px;
    }

    .hs-search-hint {
        margin-top: 10px;

        font-size: 12px;
    }
}


@media (max-width: 560px) {

    .site-header__search {
        width: 40px;
        height: 40px;

        flex-basis: 40px;

        border-radius: 10px;

        font-size: 15px;
    }
}


/* ============================================================
   7. PRINT
   ============================================================ */

@media print {

    .site-header__search,
    .law-hero-search-link {
        display: none !important;
    }

    .hs-search-page {
        min-height: auto;

        background: #ffffff;
    }

    .hs-search-title {
        color: #262424;

        text-shadow: none;
    }

    .hs-search-hint {
        color: #262424;

        text-shadow: none;
    }
}

