/* =============================================
   recording.css — Страница записи на услугу
   BEM: блок .recording
   ============================================= */

/* ---------- Страница ---------- */
.recording-page {
    background-color: #ebf5ff;
    padding: 180px 0 100px;
    margin-bottom: -200px;
}

/* ---------- Корневой блок ---------- */
.recording {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: start;
    max-width: 1160px;
    margin: 0 auto;
}

/* ---------- Заголовок ---------- */
.recording__title {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 26px;
    line-height: 1.2;
    letter-spacing: 0;
    color: #28314d;
    text-transform: uppercase;
    margin: 0 0 10px;
}

/* ---------- Информационная секция: клиника + услуга ---------- */
.recording__info {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

/* --- Карточка клиники --- */
.recording__clinic-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fff;
    border-radius: 15px;
    padding: 10px;
    flex: 0 0 460px;
    max-width: 460px;
    min-height: 114px;
}

.recording__clinic-image {
    flex-shrink: 0;
    width: 94px;
    height: 94px;
    border-radius: 15px;
    overflow: hidden;
}

.recording__clinic-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recording__clinic-details {
    display: flex;
    flex-direction: column;
    gap: 13px;
    flex: 1;
}

.recording__clinic-name {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.7;
    color: #28314d;
    text-transform: uppercase;
    margin: 0;
}

.recording__clinic-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recording__clinic-address,
.recording__clinic-metro {
    display: flex;
    align-items: center;
    gap: 11px;
}

.recording__clinic-address span,
.recording__clinic-metro span {
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 1.3;
    color: #28314d;
}

.recording__icon {
    flex-shrink: 0;
    width: 12px;
    height: 15px;
}

.recording__icon--metro {
    width: 16px;
    height: 16px;
}

/* --- Карточка услуги --- */
.recording__service-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 13px;
    background: #fff;
    border-radius: 15px;
    padding: 10px 20px;
    flex: 0 0 320px;
    width: 320px;
    max-width: 320px;
    flex: 1;
}

.recording__service-label {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.7;
    color: #28314d;
    text-transform: uppercase;
    margin: 0;
}

.recording__service-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recording__service-name {
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 1.3;
    color: #28314d;
    margin: 0;
}

.recording__service-price {
    display: flex;
    align-items: baseline;
    gap: 9px;
    margin: 0;
}

.recording__service-price-label {
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 1.3;
    color: #28314d;
}

.recording__service-price-value {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 12px;
    line-height: 1.4;
    color: #28314d;
}

/* ---------- Общий стиль блока (белая карточка) ---------- */
.recording__block {
    background: #fff;
    border-radius: 30px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recording__block-title {
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.5;
    color: #28314d;
    margin: 0;
}

.recording__block-title--small {
    font-size: 14px;
}

/* ---------- Блок: дата и время ---------- */
.recording__block--datetime {
    border-radius: 30px;
    position: relative;
    width: 100%;
}

.recording__datetime {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

/* --- Дни --- */
.recording__days-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.recording__days-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 128px;
    height: 50px;
    background: linear-gradient(to left, #fff 52%, rgba(255, 255, 255, 0) 100%);
    border-radius: 25px 0 0 25px;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.recording__days-wrapper--overflowing::after {
    opacity: 1;
}

.recording__days {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
    position: relative;
    scroll-behavior: smooth;
    padding-right: 112px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}

.recording__days::-webkit-scrollbar {
    display: none;
}

.recording__days--dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.recording__day {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    flex-shrink: 0;
    width: 94px;
    height: 50px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #979ca9;
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    color: inherit;
    font-size: 12px;
    line-height: 1.3;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
    box-sizing: border-box;
    text-align: left;
}

.recording__day::after {
    content: "";
    position: absolute;
    inset: -1px;
    border: 2px solid #5d72b7;
    border-radius: inherit;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.recording__day--active {
    color: #5d72b7;
}

.recording__day:hover::after,
.recording__day:focus-visible::after,
.recording__day--active::after {
    opacity: 1;
}

.recording__day:focus-visible {
    outline: none;
}

.recording__day-date {
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    white-space: nowrap;
}

.recording__day--active .recording__day-date {
    font-weight: 700;
}

.recording__day:not(.recording__day--active) .recording__day-date {
    font-weight: 600;
    color: #4a4a4a;
}

.recording__day-label {
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
}

.recording__day--active .recording__day-label {
    color: #5d72b7;
}

.recording__day:not(.recording__day--active) .recording__day-label {
    color: #979ca9;
}

/* Фейд последнего дня */
/* Кнопка-стрелка */
.recording__days-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    position: absolute;
    top: 12px;
    right: 18px;
    z-index: 3;
    background: #28314d;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    box-sizing: border-box;
    transition:
        opacity 0.2s ease,
        background-color 0.2s ease;
}

.recording__days-arrow[disabled] {
    opacity: 0;
    pointer-events: none;
}

.recording__days-arrow:focus-visible {
    outline: 2px solid #5d72b7;
    outline-offset: 2px;
}

/* --- Слоты времени --- */
.recording__times {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.recording__time {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 94px;
    height: 34px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #979ca9;
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: 12px;
    line-height: 1.3;
    color: #4a4a4a;
    white-space: nowrap;
    cursor: pointer;
    box-sizing: border-box;
    position: relative;
    text-align: left;
    transition: color 0.2s ease;
}

.recording__time::after {
    content: "";
    position: absolute;
    inset: -1px;
    border: 2px solid #5d72b7;
    border-radius: inherit;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.recording__time--active,
.recording__time:hover {
    color: #4a4a4a;
}

.recording__time:hover::after,
.recording__time:focus-visible::after,
.recording__time--active::after {
    opacity: 1;
}

.recording__time--active {
    color: #5d72b7;
}

.recording__time:focus-visible {
    outline: none;
}

/* ---------- Блок: форма ---------- */
.recording__block--form {
    border-radius: 15px;
    gap: 20px;
    width: 100%;
}

.recording__form-fields {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    align-items: center;
}

.recording__field {
    flex: 1;
}

.recording__field--birthday {
    flex: 0 0 210px;
}

.recording__input {
    width: 100%;
    height: 40px;
    padding: 11px 12px;
    border: 1px solid #979ca9;
    border-radius: 10px;
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.3;
    color: #28314d;
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.recording__input::placeholder {
    color: #979ca9;
}

.recording__input:focus {
    border-color: #5d72b7;
}

/* Чекбокс согласия */
.recording__consent {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.recording__consent-checkbox {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border: 1px solid #979ca9;
    border-radius: 5px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background: #fff;
    transition:
        background 0.2s ease,
        border-color 0.2s ease;
    position: relative;
}

.recording__consent-checkbox:checked {
    background-color: #5d72b7;
    border-color: #5d72b7;
}

.recording__consent-checkbox:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 2px;
    width: 5px;
    height: 8px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.recording__consent-text {
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    font-size: 10px;
    line-height: 1.3;
    color: #28314d;
}

.recording__consent-link {
    color: #5d72b7;
    text-decoration: none;
}

.recording__consent-link:hover {
    text-decoration: underline;
}

/* --- Блок оплаты --- */
.recording__block--payment {
    width: 310px;
    border-radius: 15px;
    gap: 20px;
}

.recording__payment-methods {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.recording__payment-method {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 125px;
    height: 64px;
    padding: 0;
    border: 1.5px solid #979ca9;
    border-radius: 10px;
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
    box-sizing: border-box;
}

.recording__payment-method--sbp {
    padding: 17px 35px 16px;
}

.recording__payment-method--card {
    flex-direction: column;
    gap: 8px;
    padding: 12px 21px 9px;
}

.recording__payment-logo {
    display: block;
    width: 54.88px;
    height: 30.75px;
    object-fit: contain;
}

.recording__payment-method svg {
    display: block;
    width: 29.77px;
    height: 22.33px;
    flex-shrink: 0;
}

.recording__payment-method--active {
    border-color: #5d72b7;
    background: #f8faff;
    box-shadow: 0 0 0 1px rgba(93, 114, 183, 0.12);
}

.recording__payment-method:hover,
.recording__payment-method:focus-visible {
    border-color: #5d72b7;
    outline: none;
}

.recording__payment-name {
    width: 83px;
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    font-size: 10px;
    line-height: 1.3;
    color: #28314d;
    text-align: center;
}

/* --- Кнопка CTA --- */
.recording__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 308px;
    height: 40px;
    padding: 9px 27px 10px 25px;
    background: #28314d;
    border: none;
    border-radius: 50px;
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.5;
    color: #fdffff;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
    align-self: start;
}

.recording__submit:hover {
    background: #3a4a6b;
}

/* =============================================
   АДАПТИВ — мобилка (≤ 768px)
   ============================================= */

@media (max-width: 768px) {
    .recording-page {
        padding: 96px 0 60px 0;
        margin-bottom: 0;
    }

    .recording {
        gap: 10px;
    }

    .recording__title {
        font-size: 20px;
        line-height: 1.4;
    }

    /* Информационная секция — стековая колонка */
    .recording__info {
        flex-direction: column;
        gap: 10px;
    }

    .recording__clinic-card {
        flex: unset;
        max-width: 100%;
        width: 100%;
        min-height: unset;
        padding: 15px 10px;
    }

    .recording__clinic-image {
        width: 80px;
        height: 80px;
    }

    .recording__clinic-details {
        gap: 8px;
    }

    .recording__service-card {
        padding: 15px 10px;
        min-height: unset;
        gap: 8px;
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Datetime блок */
    .recording__block--datetime {
        border-radius: 15px;
        gap: 10px;
        padding: 15px 10px;
    }

    .recording__block-title {
        font-size: 14px;
    }

    .recording__datetime {
        gap: 10px;
    }

    .recording__day {
        width: 84px;
        min-width: 84px;
        height: auto;
        padding: 8px 12px;
        font-size: 10px;
    }

    .recording__time {
        width: 84px;
        min-width: 84px;
        height: auto;
        padding: 8px 12px;
        font-size: 10px;
    }

    /* Форма — поля стекуются */
    .recording__block--form {
        border-radius: 15px;
        padding: 20px 10px;
    }

    .recording__form-fields {
        flex-direction: column;
        flex-wrap: wrap;
        gap: 8px;
    }

    .recording__field {
        width: 100%;
        flex: unset;
    }

    .recording__field--birthday {
        flex: unset;
        width: 100%;
    }

    /* Блок оплаты */
    .recording__block--payment {
        width: 100%;
        padding: 20px;
        border-radius: 15px;
        gap: 10px;
    }

    .recording__payment-methods {
        gap: 10px;
        align-items: center;
    }

    .recording__payment-method {
        width: auto;
        height: 46px;
    }

    .recording__payment-method--sbp {
        padding: 10px 15px;
    }

    .recording__payment-method--card {
        flex-direction: row;
        gap: 8px;
        padding: 10px 15px;
    }

    .recording__payment-logo {
        width: 40px;
        height: 23px;
    }

    .recording__payment-method svg {
        width: 20px;
        height: 15px;
    }

    .recording__payment-name {
        width: auto;
        white-space: nowrap;
    }

    .recording__submit {
        width: 100%;
        max-width: 308px;
        margin: 0 auto;
        align-self: unset;
    }
}
