/* MD: Примерочная - правки с 10.10.2026 и стили «Моё фото».
   Подключается в хуке styles.post.tpl отдельной ссылкой с версией по времени правки, после общего CSS
   витрины: правки доходят до браузеров сразу, без пересборки общего CSS (в styles.less то же самое,
   на случай его пересборки). */

/* Кнопка примерочной справа внизу. Над консультантом и плашкой cookie её поднимает скрипт
   (раз в секунду сверяет их место); правило с :has() держит её над консультантом и до этого. */
.mdfr-launcher {
    right: 16px;
    left: auto;
    transition: bottom 0.25s ease;
}

@media (min-width: 768px) {
    .mdfr-launcher {
        right: 22px;
        bottom: 22px;
        left: auto;
    }

    body:has(.hdt-ai__launcher) .mdfr-launcher {
        bottom: 90px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mdfr-launcher {
        transition: none;
    }
}

/* Панель справа и на компьютере. */
@media (min-width: 601px) {
    .mdfr-panel {
        right: 0;
        left: auto;
        box-shadow: -12px 0 40px rgba(0, 0, 0, 0.18);
    }
}

/* «Моё фото» на компьютере: панель шире, окно камеры 4:3 около 560x420. */
@media (min-width: 768px) {
    .mdfr-panel.is-wide {
        width: 600px;
    }
}

/* Режим примерки */
.mdfr-modes {
    display: flex;
    margin-bottom: 12px;
    border-bottom: 1px solid #e6e4dc;
}

.mdfr-modes button {
    flex: 1;
    height: 40px;
    margin-bottom: -1px;
    padding: 0 6px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: #6b6b66;
    font-size: 14px;
}

.mdfr-modes button:hover:not(:disabled) {
    color: #171c17;
}

.mdfr-modes button.is-on {
    border-bottom-color: #171c17;
    color: #171c17;
    font-weight: 600;
}

.mdfr-modes button:disabled {
    cursor: default;
}

/* Моё фото */
.mdfr-photo__row {
    display: flex;
    gap: 8px;
}

.mdfr-btn {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #171c17;
    border-radius: 8px;
    background: transparent;
    color: #171c17;
    font-size: 14px;
    white-space: nowrap;
}

.mdfr-btn:hover:not(:disabled) {
    background: #171c17;
    color: #fff;
}

.mdfr-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.mdfr-photo__drop {
    flex: none;
    width: 42px;
    padding: 0;
    border-color: #d7d6cf;
    color: #8a8a83;
    font-size: 22px !important;
    line-height: 1;
}

.mdfr-photo__tip {
    margin: 8px 0 0;
    color: #6b6b66;
    font-size: 12px;
}

/* Камера внутри сцены: окно 4:3 для горизонтальной камеры и 3:4 для вертикальной (ставит скрипт),
   на телефоне не выше 62% экрана. Сохраняется ровно видимая часть кадра. */
.mdfr-stage.is-camera {
    height: auto;
    max-height: 62vh;
    aspect-ratio: 3 / 4;
}

.mdfr-cam {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    background: #0d0f0d;
}

.mdfr-cam__video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Фронтальная камера - как в зеркале, снимок сохраняется таким же. */
.mdfr-cam__video.is-mirror {
    transform: scaleX(-1);
}

/* Контур головы и плеч: лёгкое затемнение вокруг, чтобы было видно человека и фон. */
.mdfr-cam__guide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.mdfr-cam__shade {
    fill: rgba(0, 0, 0, 0.22);
}

.mdfr-cam__outline {
    fill: none;
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 2;
    stroke-dasharray: 7 6;
    vector-effect: non-scaling-stroke;
}

.mdfr-cam__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 24px !important;
    line-height: 1;
}

.mdfr-cam__count {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 96px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
    pointer-events: none;
}

.mdfr-cam__bar {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    padding: 28px 12px 14px;
    background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.55));
}

.mdfr-cam__btn {
    height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 13px;
    white-space: nowrap;
}

.mdfr-cam__btn:hover {
    background: rgba(255, 255, 255, 0.32);
}

.mdfr-cam__timer {
    justify-self: start;
}

.mdfr-cam__shot {
    grid-column: 2;
    width: 62px;
    height: 62px;
    padding: 0;
    border: 4px solid #fff;
    border-radius: 50%;
    background: #d4f700;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s ease;
}

.mdfr-cam__shot:hover {
    transform: scale(1.05);
}

.mdfr-cam__shot:active {
    transform: scale(0.94);
}

.mdfr-cam__flip {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    padding: 0;
}

.mdfr-cam__flip svg {
    width: 20px;
    height: 20px;
}

/* Связаться с нами: телефон витрины и «Перезвоните мне» под образами */
.mdfr-contact {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #efeee9;
}

.mdfr-contact__text {
    margin: 6px 0 10px;
    color: #55554f;
    font-size: 13px;
}

.mdfr-contact__phone {
    color: #171c17;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}

.mdfr-contact__phone:hover {
    color: #171c17;
    text-decoration: underline;
}

.mdfr-contact__form {
    display: flex;
    gap: 8px;
}

.mdfr-panel .mdfr-contact__input {
    flex: 1;
    min-width: 0;
    height: 42px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid #d7d6cf;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    color: #171c17;
    font: inherit;
    font-size: 16px;
}

.mdfr-panel .mdfr-contact__input:focus {
    border-color: #171c17;
    outline: none;
}

.mdfr-contact__send {
    flex: none;
    border-color: #171c17;
    background: #171c17;
    color: #fff;
}

.mdfr-contact__done {
    margin: 10px 0 0;
    font-size: 13px;
}

.mdfr-contact__done.is-ok {
    color: #2f6b1f;
}

.mdfr-contact__done.is-error {
    color: #8a1c1c;
}

/* Видео-примерка (вкладка выключена флагом DECART_ON в скрипте) */
.mdfr-videobox {
    margin-bottom: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #f1efe9;
}

.mdfr-videobox b {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.mdfr-videobox p {
    margin: 0;
    color: #55554f;
    font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
    .mdfr-cam__shot {
        transition: none;
    }
}
