/* Personal data (Law 99-З): footer documents, cookie banner, consent checkbox, policy pages, withdrawal form. */

/* Footer: links to the documents */
.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    margin-bottom: 20px;
}
.footer-legal__link {
    color: #fff;
    font-size: 14px;
    line-height: 1.3;
    text-decoration: underline;
    font-family: 'Roboto', sans-serif;
}
.footer-legal__link:hover {
    color: #fff;
    opacity: .8;
}
@media (max-width: 510px) {
    .footer-legal {
        display: block;
        margin-top: 20px;
    }
    .footer-legal__link {
        display: block;
        margin-bottom: 12px;
    }
}

/* Consent checkbox in forms: a white square in the style of the site's round radio buttons */
.consent-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
    color: inherit;
}
.consent-check input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin: -1px 0 0;
    border: 2px solid #fff;
    border-radius: 4px;
    background: transparent;
    position: static;
    opacity: 1;
    cursor: pointer;
}
.consent-check input[type="checkbox"]:checked {
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23691D35' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat;
}
.consent-check input[type="checkbox"]:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
.consent-check a,
.policy-notice a {
    color: inherit;
    text-decoration: underline dotted;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.consent-error {
    display: block;
    font-size: 13px;
    line-height: 1.4;
    color: #ffc4c4;
    margin: 6px 0 0;
}
.consent-check-wrap {
    margin: 10px auto;
    max-width: 520px;
}
/* "Нажимая кнопку..." under the order and registration buttons: small and quiet */
.policy-notice,
p.policy-notice {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    color: rgba(255, 255, 255, .78);
    margin: 14px 0 0;
}

/* Policy pages. The site styles every paragraph there as
   ".delivery .custom__container .delivery__text p" (20px), hence the long selectors. */
.delivery .custom__container .delivery__text p.policy-edition {
    color: rgba(255, 255, 255, .7);
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400;
    margin-bottom: 20px;
}
.delivery__text h2.policy-heading {
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
    margin: 32px 0 14px;
    text-transform: none;
}
/* Only the policy pages and the lists the release adds (class policy-list): other static
   pages keep their own list look */
.delivery__text .policy-body ul,
.delivery__text ul.policy-list {
    padding-left: 22px;
    margin: 0 0 14px;
    list-style: disc;
}
.delivery__text .policy-body ul li,
.delivery__text ul.policy-list li {
    margin-bottom: 6px;
    list-style: disc;
}
.delivery__text .policy-body ul ul {
    margin: 6px 0 0;
}
.delivery__text .policy-body ul ul li {
    list-style: circle;
}
.delivery__text .policy-table {
    overflow-x: auto;
    margin: 14px 0 22px;
}
.delivery__text .policy-table table {
    border-collapse: collapse;
    width: 100%;
    min-width: 640px;
    font-size: 14px;
    line-height: 1.35;
}
.delivery__text .policy-table th,
.delivery__text .policy-table td {
    border: 1px solid rgba(255, 255, 255, .35);
    padding: 8px 10px;
    vertical-align: top;
    text-align: left;
}
.delivery__text .policy-table th {
    /* !important: cart-calendar.css styles every th on the site (black text, no background) */
    color: #fff !important;
    background: rgba(255, 255, 255, .12) !important;
    font-weight: 600;
}
.delivery .custom__container .delivery__text .policy-table th p {
    color: inherit;
}
/* Cells wrap their text in <p>: keep it table-sized, and bold in the header */
.delivery .custom__container .delivery__text .policy-table p {
    font-size: 14px;
    line-height: 1.35;
    font-weight: inherit;
    margin: 0 0 4px;
}
.delivery .custom__container .delivery__text .policy-table p:last-child {
    margin-bottom: 0;
}
.delivery__text .policy-table p {
    margin: 0 0 6px;
}
.delivery__text .policy-table p:last-child {
    margin-bottom: 0;
}

/* Withdrawal form */
.legal-form form {
    max-width: 520px;
    margin-top: 24px;
}
.legal-form__field {
    margin-bottom: 14px;
}
.legal-form__field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}
.legal-form__field input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #c9c9d1;
    border-radius: 6px;
    font-size: 16px;
}
.legal-form__hint,
.delivery .custom__container .delivery__text p.legal-form__hint {
    font-size: 13px;
    line-height: 1.4;
    font-weight: 400;
    color: rgba(255, 255, 255, .7);
}
.legal-form__errors {
    border: 1px solid #ff8a8f;
    border-radius: 6px;
    padding: 10px 14px;
    margin-top: 16px;
    background: rgba(228, 0, 7, .25);
    color: #fff;
}
.legal-form__errors p {
    margin: 0;
}
.legal-form__done {
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 6px;
    padding: 14px 18px;
}
.legal-form__submit {
    margin-top: 10px;
    /* Room for «Отправляем…» too, so the button does not grow while sending */
    min-width: min(300px, 100%);
}
.legal-form__submit[disabled] {
    /* While sending the button shows «Отправляем…» and keeps its colours; narrower side
       padding keeps the spinner and the label on one line on a 320px phone */
    cursor: progress;
    white-space: nowrap;
    padding-left: 16px;
    padding-right: 16px;
}
/* Field errors of the withdrawal form (checked in the browser before sending) */
.legal-form__error {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.4;
    color: #ffc4c4;
}
.legal-form__field.is-invalid input {
    border-color: #ff8a8f;
    box-shadow: 0 0 0 1px #ff8a8f;
}
.legal-form__links {
    margin-top: 2px;
}
.legal-form__link {
    background: none;
    border: 0;
    /* A finger-sized target */
    padding: 12px 0;
    margin: 0 20px 0 0;
    color: #fff;
    font-size: 14px;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
    cursor: pointer;
}
.legal-form__link[disabled] {
    opacity: .6;
    cursor: default;
    text-decoration: none;
}
/* The site styles every paragraph of the page as 16-20px text and keeps its links on one line */
.delivery .custom__container .delivery__text p.policy-notice {
    font-size: 13px;
    line-height: 1.45;
    font-weight: 400;
}
.delivery .custom__container .delivery__text p.policy-notice a {
    color: inherit;
    white-space: normal;
}

/* Cookie banner */
.cookie-banner[hidden],
.cookie-settings[hidden] {
    display: none !important;
}
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 1100px;
    z-index: 100000;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 22px;
    background: #fff;
    color: #222;
    border-radius: 12px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, .25);
    font-family: 'Montserrat', 'Roboto', sans-serif;
    font-size: 14px;
    line-height: 1.4;
}
.cookie-banner p {
    margin: 0;
}
.cookie-banner__title,
.cookie-settings__title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px !important;
}
.cookie-banner a,
.cookie-settings a {
    color: #691D35;
    text-decoration: underline;
}
.cookie-banner__buttons {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
}
.cookie-btn {
    min-width: 128px;
    height: 42px;
    padding: 0 16px;
    border: 2px solid #691D35;
    border-radius: 8px;
    background: #691D35;
    color: #fff;
    font: 600 14px 'Montserrat', 'Roboto', sans-serif;
    cursor: pointer;
}
.cookie-btn:hover {
    background: #481120;
    border-color: #481120;
}
@media (max-width: 860px) {
    .cookie-banner {
        display: block;
        bottom: 0;
        width: 100%;
        border-radius: 12px 12px 0 0;
        padding: 16px;
    }
    .cookie-banner__buttons {
        margin-top: 12px;
    }
    .cookie-btn {
        flex: 1;
        min-width: 0;
        padding: 0 6px;
    }
}

.cookie-settings {
    position: fixed;
    inset: 0;
    z-index: 100001;
    background: rgba(0, 0, 0, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.cookie-settings__box {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: #fff;
    color: #222;
    border-radius: 12px;
    padding: 24px;
    font-family: 'Montserrat', 'Roboto', sans-serif;
    font-size: 14px;
    line-height: 1.4;
}
.cookie-settings__close {
    position: absolute;
    top: 8px;
    right: 12px;
    border: 0;
    background: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #555;
}
.cookie-settings__group {
    border-top: 1px solid #e4e4ea;
    padding: 14px 0 4px;
    margin-top: 12px;
}
.cookie-settings__group p {
    margin: 6px 0 0;
    color: #555;
}
.cookie-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    margin: 0;
    cursor: pointer;
}
.cookie-switch input {
    width: 18px;
    height: 18px;
    accent-color: #691D35;
    position: static;
    opacity: 1;
    -webkit-appearance: auto;
    appearance: auto;
}
.cookie-switch__state {
    font-weight: 400;
    color: #8B90A0;
}
.cookie-settings__buttons {
    margin-top: 18px;
}

/* Basket: the consent is one more line of the payment form, the notice sits under the buttons */
.consent-wrap {
    margin: 4px 0 36px;
}
/* A taller tap area, and room before the "Назад" button so a miss does not go a step back */
.consent-wrap .consent-check {
    margin: 0;
    padding: 6px 0;
}
.form__bottom .policy-notice {
    text-align: center;
}
.account__formRegistration .policy-notice {
    text-align: center;
}

/* Lists and links in the policies follow the site's paragraph size at each width
   (styles.min.css: 20px, 16px up to 1600px, 14px up to 600px). The site keeps links on
   one line, which pushes a long policy link off a phone screen: let them wrap. */
.delivery .custom__container .delivery__text .policy-body li,
.delivery .custom__container .delivery__text ul.policy-list li {
    font-weight: 500;
    font-size: 20px;
    line-height: 24px;
}
.delivery .custom__container .delivery__text .policy-body p a,
.delivery .custom__container .delivery__text p.policy-text a {
    white-space: normal;
}
@media screen and (max-width: 1600px) {
    .delivery .custom__container .delivery__text .policy-body li,
    .delivery .custom__container .delivery__text ul.policy-list li {
        font-size: 16px;
        line-height: 20px;
    }
}
@media screen and (max-width: 600px) {
    .delivery .custom__container .delivery__text .policy-body li,
    .delivery .custom__container .delivery__text ul.policy-list li {
        font-size: 14px;
        line-height: 17px;
    }
}
.legal-form__done:focus {
    outline: none;
}

/* Invisible reCAPTCHA: the badge is hidden, the forms say they are protected (CaptchaNotice.vue) */
.grecaptcha-badge {
    visibility: hidden;
}
.captcha-notice,
p.captcha-notice {
    margin: 6px 0 0;
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    color: rgba(255, 255, 255, .7);
    text-align: center;
}
.legal-form .captcha-notice {
    text-align: left;
}
.captcha-notice a {
    color: inherit;
    text-decoration: underline;
}

/* The registration panel scrolls inside the screen: room below "Войти в кабинет" so the
   button does not touch the bottom edge */
.account__formWrap .account__formRegistration .form__bottom {
    padding-bottom: 40px;
}
/* On the withdrawal page the site's paragraph rule (.delivery__text p) wins otherwise */
.delivery .custom__container .delivery__text p.captcha-notice {
    font-size: 12px;
    line-height: 1.4;
    font-weight: 400;
    color: rgba(255, 255, 255, .7);
    margin: 6px 0 0;
}
.delivery .custom__container .delivery__text p.captcha-notice a {
    color: inherit;
    white-space: normal;
    text-decoration: underline;
}

/* Sending state of the form buttons: the label turns into a spinner and «Отправляем…».
   The button keeps its size and colours (no fading); the side spinner of
   vue-loading-button is not used */
.btn-spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-right: .6em;
    vertical-align: -.15em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: btn-spin .7s linear infinite;
}
@keyframes btn-spin {
    to { transform: rotate(360deg); }
}
.account__formWrap .vue-loading-button .spinner {
    display: none !important;
}
/* The narrow buttons of the panel (password reset: 240px) keep «Отправляем…» on one line */
.account__formWrap .vue-loading-button.loading {
    white-space: nowrap;
    padding-left: 10px !important;
    padding-right: 10px !important;
}
.account__formWrap .vue-loading-button.loading {
    /* vue-loading-button fades a loading button; the label already says what happens */
    opacity: 1 !important;
    cursor: progress;
}
@media (prefers-reduced-motion: reduce) {
    .btn-spinner {
        animation: none;
        border-right-color: currentColor;
        opacity: .6;
    }
}
