/* Отдельный виджет для medeor74.ru. Все правила ограничены префиксом mdrc-. */
.mdrc-root {
    --mdrc-burgundy: #5f223e;
    --mdrc-burgundy-dark: #49182e;
    --mdrc-sand: #e4d5c4;
    --mdrc-text: #333333;
    --mdrc-right: 40px;
    --mdrc-bottom: 104px;

    color: var(--mdrc-text);
    font-family: "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.4;
}

.mdrc-root,
.mdrc-root * {
    box-sizing: border-box;
}

.mdrc-root [hidden] {
    display: none !important;
}

.mdrc-root button,
.mdrc-root input {
    font: inherit;
}

.mdrc-root button {
    cursor: pointer;
    appearance: none;
}

.mdrc-root .mdrc-trigger {
    position: fixed;
    right: 24px;
    bottom: var(--mdrc-bottom);
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    padding: 15px;
    border: 0;
    border-radius: 50%;
    background: var(--mdrc-burgundy);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(228, 213, 196, .9), 0 7px 24px rgba(70, 22, 43, .3);
    transition: background .2s ease, transform .2s ease;
}

.mdrc-root .mdrc-trigger:hover {
    background: var(--mdrc-burgundy-dark);
    transform: translateY(-2px);
}

.mdrc-root .mdrc-trigger:focus-visible,
.mdrc-root .mdrc-close:focus-visible,
.mdrc-root .mdrc-submit:focus-visible,
.mdrc-root .mdrc-done:focus-visible {
    outline: 3px solid var(--mdrc-sand);
    outline-offset: 3px;
}

.mdrc-trigger svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.mdrc-root .mdrc-panel {
    position: fixed;
    right: var(--mdrc-right);
    bottom: calc(var(--mdrc-bottom) + 76px);
    z-index: 2147483000;
    width: min(380px, calc(100vw - 32px));
    max-height: calc(100vh - var(--mdrc-bottom) - 92px);
    max-height: calc(100dvh - var(--mdrc-bottom) - 92px);
    overflow-y: auto;
    border: 1px solid var(--mdrc-sand);
    border-top: 4px solid var(--mdrc-burgundy);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 20px 55px rgba(50, 18, 35, .25);
    text-align: left;
    -webkit-overflow-scrolling: touch;
}

.mdrc-head {
    position: relative;
    padding: 21px 50px 19px 24px;
    border-bottom: 1px solid var(--mdrc-sand);
    background: #f8f3ed;
}

.mdrc-eyebrow {
    margin-bottom: 5px;
    color: var(--mdrc-burgundy);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
}

.mdrc-root .mdrc-title {
    margin: 0;
    color: var(--mdrc-burgundy);
    font-family: "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
}

.mdrc-root .mdrc-close {
    position: absolute;
    top: 16px;
    right: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 5px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--mdrc-burgundy);
}

.mdrc-root .mdrc-close:hover {
    background: var(--mdrc-sand);
}

.mdrc-close svg,
.mdrc-success-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mdrc-body {
    padding: 20px 24px 24px;
}

.mdrc-root .mdrc-intro {
    margin: 0 0 18px;
    color: #665f62;
    font-size: 16px;
}

.mdrc-root .mdrc-field {
    display: block;
    margin-bottom: 15px;
}

.mdrc-label {
    display: block;
    margin-bottom: 6px;
    color: var(--mdrc-text);
    font-size: 15px;
    font-weight: 700;
}

.mdrc-root .mdrc-input {
    display: block;
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 10px 13px;
    border: 1px solid #d7c7c5;
    border-radius: 5px;
    background: #fff;
    color: var(--mdrc-text);
    font-size: 16px;
    line-height: 1.3;
    box-shadow: none;
    outline: none;
}

.mdrc-root .mdrc-input::placeholder {
    color: #938a8d;
    opacity: 1;
}

.mdrc-phone-control {
    position: relative;
    display: block;
}

.mdrc-phone-prefix {
    position: absolute;
    top: 0;
    left: 14px;
    display: flex;
    align-items: center;
    height: 46px;
    color: var(--mdrc-text);
    pointer-events: none;
}

.mdrc-root .mdrc-phone-input {
    padding-left: 43px;
}

.mdrc-root .mdrc-input:focus {
    border-color: var(--mdrc-burgundy);
    box-shadow: 0 0 0 2px rgba(95, 34, 62, .12);
}

.mdrc-root .mdrc-field-hint,
.mdrc-root .mdrc-field-error {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.35;
}

.mdrc-root .mdrc-field-hint {
    color: #665f62;
}

.mdrc-root .mdrc-field-error {
    color: #9d303b;
}

.mdrc-root .mdrc-input[aria-invalid="true"] {
    border-color: #9d303b;
    box-shadow: 0 0 0 2px rgba(157, 48, 59, .12);
}

.mdrc-root .mdrc-consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 3px 0 18px;
    color: #665f62;
    font-size: 13px;
    line-height: 1.35;
    cursor: pointer;
}

.mdrc-root .mdrc-consent-input {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    margin: 1px 0 0;
    accent-color: var(--mdrc-burgundy);
}

.mdrc-root .mdrc-consent a {
    color: var(--mdrc-burgundy);
    text-decoration: underline;
}

.mdrc-root .mdrc-error {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 5px;
    background: #f8e9e9;
    color: #9d303b;
    font-size: 14px;
}

.mdrc-root .mdrc-submit,
.mdrc-root .mdrc-done {
    display: block;
    width: 100%;
    min-height: 47px;
    padding: 10px 16px;
    border: 1px solid var(--mdrc-burgundy);
    border-radius: 5px;
    background: var(--mdrc-burgundy);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    transition: background .2s ease;
}

.mdrc-root .mdrc-submit:hover:not(:disabled),
.mdrc-root .mdrc-done:hover {
    background: var(--mdrc-burgundy-dark);
}

.mdrc-root .mdrc-submit:disabled {
    opacity: .65;
    cursor: default;
}

.mdrc-success {
    padding: 12px 0 0;
    text-align: center;
}

.mdrc-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--mdrc-burgundy);
    color: #fff;
}

.mdrc-root .mdrc-success-title {
    margin: 0 0 8px;
    color: var(--mdrc-burgundy);
    font-family: "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
    font-size: 24px;
    line-height: 1.2;
}

.mdrc-root .mdrc-success-text {
    margin: 0 0 22px;
    color: #665f62;
}

@media (max-width: 560px) {
    .mdrc-root {
        --mdrc-right: 16px;
        --mdrc-bottom: 96px;
    }

    .mdrc-root .mdrc-panel {
        right: var(--mdrc-right);
        width: calc(100vw - 32px);
    }

    .mdrc-head {
        padding-left: 20px;
    }

    .mdrc-body {
        padding: 18px 20px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mdrc-root .mdrc-trigger,
    .mdrc-root .mdrc-submit,
    .mdrc-root .mdrc-done {
        transition: none;
    }
}
