.ahrb-wrap,
.ahrb-modal {
    font-family: Montserrat, Arial, sans-serif;
    color: #282828;
    box-sizing: border-box;
}

.ahrb-wrap *,
.ahrb-modal * {
    box-sizing: border-box;
}

.ahrb-wrap {
    width: 100%;
    flex: 0 0 100%;
    padding: 18px 20px;
    background: #fff8f4;
}

.ahrb-banner {
    width: 100%;
    min-height: 132px;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    padding: 22px 24px;
    border: 1px solid #f3a07b;
    border-radius: 14px;
    background: linear-gradient(90deg, #ffffff 0%, #fffdfb 100%);
    box-shadow: 0 6px 24px rgba(28, 31, 35, .04);
}

.ahrb-banner__icon {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #fff0e8;
    color: #e94f17;
}

.ahrb-banner__icon svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ahrb-banner__content {
    min-width: 0;
}

.ahrb-banner__eyebrow {
    margin-bottom: 6px;
    color: #e94f17;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;
    letter-spacing: .02em;
}

.ahrb-banner__title {
    color: #171717;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
}

.ahrb-banner__text {
    max-width: 760px;
    margin-top: 8px;
    color: #696969;
    font-size: 16px;
    line-height: 1.55;
    font-weight: 400;
}

.ahrb-banner__action {
    display: flex;
    justify-content: flex-end;
}

.ahrb-banner__button {
    min-width: 236px;
    min-height: 48px;
    border: 0;
    border-radius: 10px;
    padding: 12px 22px;
    background: #e94f17;
    color: #fff;
    font-family: Montserrat, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.ahrb-banner__button:hover {
    background: #d94612;
    box-shadow: 0 8px 20px rgba(233, 79, 23, .16);
    transform: translateY(-1px);
}

.ahrb-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ahrb-modal.is-open {
    display: flex;
}

.ahrb-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 20, .46);
    backdrop-filter: blur(2px);
}

.ahrb-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 560px);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 28px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .18);
}

.ahrb-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: #f5f5f5;
    color: #555;
    font-family: Arial, sans-serif;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.ahrb-modal__eyebrow {
    color: #e94f17;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;
}

.ahrb-modal__title {
    margin-top: 6px;
    padding-right: 44px;
    color: #181818;
    font-size: 24px;
    line-height: 1.3;
    font-weight: 700;
}

.ahrb-modal__subtitle {
    margin-top: 8px;
    color: #777;
    font-size: 14px;
    line-height: 1.55;
}

.ahrb-form__service {
    margin-top: 20px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff6f1;
    color: #d94612;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 700;
}

.ahrb-cf7 {
    margin-top: 16px;
}

.ahrb-cf7 .wpcf7-form {
    margin: 0;
    font-family: Montserrat, Arial, sans-serif;
}

.ahrb-cf7 .wpcf7-form > p {
    margin: 0 0 14px;
}

.ahrb-cf7 .wpcf7-form > p:last-of-type {
    margin-bottom: 0;
}

.ahrb-cf7 label {
    display: block;
    color: #333;
    font-family: Montserrat, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 600;
}

.ahrb-cf7 .wpcf7-form-control-wrap {
    display: block;
    margin-top: 6px;
}

.ahrb-cf7 input[type="text"],
.ahrb-cf7 input[type="email"],
.ahrb-cf7 input[type="url"],
.ahrb-cf7 input[type="tel"],
.ahrb-cf7 input[type="number"],
.ahrb-cf7 select,
.ahrb-cf7 textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid #dedede;
    border-radius: 10px;
    padding: 12px 14px;
    background: #fff;
    color: #282828;
    font-family: Montserrat, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    outline: none;
    box-shadow: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.ahrb-cf7 textarea {
    height: 128px;
    min-height: 128px;
    max-height: 220px;
    resize: vertical;
}

.ahrb-cf7 input:focus,
.ahrb-cf7 select:focus,
.ahrb-cf7 textarea:focus {
    border-color: #ef8f68;
    box-shadow: 0 0 0 3px rgba(233, 79, 23, .08);
}

.ahrb-cf7 input[type="submit"],
.ahrb-cf7 button[type="submit"] {
    width: 100%;
    min-height: 48px;
    margin: 2px 0 0;
    border: 0;
    border-radius: 10px;
    padding: 12px 22px;
    background: #e94f17;
    color: #fff;
    font-family: Montserrat, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.ahrb-cf7 input[type="submit"]:hover,
.ahrb-cf7 button[type="submit"]:hover {
    background: #d94612;
    box-shadow: 0 8px 20px rgba(233, 79, 23, .16);
    transform: translateY(-1px);
}

.ahrb-cf7 .wpcf7-spinner {
    display: block;
    margin: 10px auto 0;
}

.ahrb-cf7 .wpcf7-not-valid-tip {
    margin-top: 6px;
    color: #c5412b;
    font-size: 12px;
    line-height: 1.4;
}

.ahrb-cf7 .wpcf7-response-output {
    margin: 14px 0 0 !important;
    padding: 12px 14px !important;
    border-width: 1px !important;
    border-radius: 10px;
    font-family: Montserrat, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

/* Согласие на персональные данные */
.ahrb-cf7 .wpcf7-form > p:has(.wpcf7-acceptance) {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: start;
    column-gap: 10px;
    row-gap: 0;
    margin: 2px 0 14px;
}

.ahrb-cf7 .wpcf7-form > p:has(.wpcf7-acceptance) > br {
    display: none;
}

.ahrb-cf7 .wpcf7-form > p:has(.wpcf7-acceptance) .wpcf7-form-control-wrap {
    width: 20px;
    margin: 0;
    line-height: 1;
}

.ahrb-cf7 .wpcf7-acceptance,
.ahrb-cf7 .wpcf7-acceptance .wpcf7-list-item,
.ahrb-cf7 .wpcf7-acceptance .wpcf7-list-item label {
    display: block;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.ahrb-cf7 .wpcf7-acceptance .wpcf7-list-item-label:empty {
    display: none;
}

.ahrb-cf7 .wpcf7-acceptance input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    margin: 0;
    border: 1px solid #cfcfcf;
    border-radius: 5px;
    background-color: #fff;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 12px 12px;
    box-shadow: none;
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.ahrb-cf7 .wpcf7-acceptance input[type="checkbox"]:hover {
    border-color: #e94f17;
}

.ahrb-cf7 .wpcf7-acceptance input[type="checkbox"]:focus-visible {
    outline: none;
    border-color: #e94f17;
    box-shadow: 0 0 0 3px rgba(233, 79, 23, .10);
}

.ahrb-cf7 .wpcf7-acceptance input[type="checkbox"]:checked {
    border-color: #e94f17;
    background-color: #e94f17;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3 8.2 6.3 11.3 13 4.8'/%3E%3C/svg%3E");
}

.ahrb-cf7 label[for="ahServicePolicy"],
.ahrb-cf7 label[for="selectPolicy2"],
.ahrb-cf7 .wpcf7-form > p:has(.wpcf7-acceptance) > label {
    display: block;
    margin: 0;
    color: #686868;
    font-family: Montserrat, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 400;
    cursor: pointer;
}

.ahrb-cf7 .wpcf7-acceptance a,
.ahrb-cf7 label[for="ahServicePolicy"] a,
.ahrb-cf7 label[for="selectPolicy2"] a,
.ahrb-cf7 .wpcf7-form > p:has(.wpcf7-acceptance) > label a {
    color: #e94f17;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ahrb-cf7__warning {
    padding: 14px;
    border-radius: 10px;
    background: #fff0ed;
    color: #a33b29;
    font-size: 14px;
    line-height: 1.5;
}

body.ahrb-modal-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .ahrb-banner {
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 16px;
    }

    .ahrb-banner__icon {
        width: 52px;
        height: 52px;
        border-radius: 12px;
    }

    .ahrb-banner__action {
        grid-column: 1 / -1;
        justify-content: stretch;
        padding-left: 68px;
    }

    .ahrb-banner__button {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .ahrb-wrap {
        padding: 12px 0;
        background: #fff8f4;
    }

    .ahrb-banner {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 12px;
        min-height: 0;
        padding: 16px;
        border-radius: 12px;
    }

    .ahrb-banner__icon {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }

    .ahrb-banner__icon svg {
        width: 26px;
        height: 26px;
    }

    .ahrb-banner__eyebrow {
        margin-bottom: 4px;
        font-size: 12px;
    }

    .ahrb-banner__title {
        font-size: 20px;
        line-height: 1.3;
    }

    .ahrb-banner__text {
        margin-top: 6px;
        font-size: 14px;
        line-height: 1.5;
    }

    .ahrb-banner__action {
        padding-left: 0;
    }

    .ahrb-banner__button {
        min-width: 0;
        min-height: 46px;
        padding: 12px 16px;
        font-size: 14px;
    }

    .ahrb-modal {
        align-items: flex-end;
        padding: 14px;
        padding-top: max(14px, env(safe-area-inset-top));
        padding-bottom: max(14px, env(safe-area-inset-bottom));
    }

    .ahrb-modal__dialog {
        width: 100%;
        max-height: calc(100dvh - 28px - env(safe-area-inset-bottom));
        padding: 24px 16px 18px;
        border: 1px solid rgba(233, 79, 23, .08);
        border-radius: 20px;
        box-shadow: 0 20px 56px rgba(18, 18, 18, .22);
        overscroll-behavior: contain;
    }

    .ahrb-modal__title {
        font-size: 20px;
    }

    .ahrb-modal__subtitle,
    .ahrb-form__service,
    .ahrb-cf7 label,
    .ahrb-cf7 .wpcf7-response-output {
        font-size: 14px;
    }

    .ahrb-cf7 input[type="text"],
    .ahrb-cf7 input[type="email"],
    .ahrb-cf7 input[type="url"],
    .ahrb-cf7 input[type="tel"],
    .ahrb-cf7 input[type="number"],
    .ahrb-cf7 select,
    .ahrb-cf7 textarea,
    .ahrb-cf7 input[type="submit"],
    .ahrb-cf7 button[type="submit"] {
        font-size: 16px;
    }

    .ahrb-cf7 textarea {
        height: 120px;
        min-height: 120px;
        max-height: 180px;
    }

    .ahrb-cf7 .wpcf7-form > p:has(.wpcf7-acceptance) {
        margin-bottom: 12px;
    }
}
