.appointment-page {
    padding-bottom: 70px;
}

.appointment-page-title {
    margin: 26px 0 0;
    color: #3a4556;
    font-size: 38px;
    font-weight: 500;
}

.appointment-shell {
    margin: 18px 0 0;
    padding: 28px;
    border-radius: 24px;
    color: #3b4657;
    background: #f4f5f7;
}

.appointment-shell__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    padding: 11px 14px;
    border-radius: 6px;
    background: #eef2f5;
}

.appointment-shell__eyebrow {
    display: none;
}

.appointment-steps {
    display: flex;
    flex: 0 0 auto;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
}

.appointment-steps span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #8b96a4;
    background: #dfe3e6;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.appointment-steps span.is-active {
    color: #fff;
    background: #48aa3d;
}

.appointment-legend {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    margin: 0;
    color: #3b4657;
    font-size: 14px;
}

.appointment-legend[hidden] {
    display: none;
}

.appointment-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    white-space: nowrap;
}

.appointment-legend span[hidden] {
    display: none;
}

.appointment-legend i {
    flex: 0 0 auto;
    color: #29465a;
    font-size: 13px;
}

.appointment-legend b {
    overflow: hidden;
    font-weight: 500;
    text-overflow: ellipsis;
}

.appointment-step-title {
    margin: 0 0 22px;
    color: #3a4556;
    font-size: 30px;
    font-weight: 500;
}

.appointment-message {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 10px;
    color: #8a2b2b;
    background: #ffe7e7;
}

.appointment-pane {
    display: none;
}

.appointment-pane.is-active {
    display: block;
}

.appointment-pane__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.appointment-pane__top h2 {
    margin: 0;
    color: #3a4556;
    font-size: 28px;
    font-weight: 500;
}

.appointment-pane__back,
.appointment-pane__next,
.appointment-form__submit,
.appointment-success a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 20px;
    border: 1px solid #48aa3d;
    border-radius: 999px;
    color: #48aa3d;
    background: #fff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.appointment-pane__next,
.appointment-form__submit,
.appointment-success a {
    color: #fff;
    background: #48aa3d;
    box-shadow: 0 12px 24px rgba(72, 170, 61, .22);
}

.appointment-pane__next:disabled,
.appointment-form__submit:disabled {
    border-color: #c8d2dc;
    color: #8693a3;
    background: #e7ebef;
    box-shadow: none;
    cursor: not-allowed;
}

.appointment-loader {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-radius: 14px;
    color: #3a4556;
    background: #fff;
    font-weight: 600;
}

.appointment-loader::before {
    content: "";
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border: 3px solid #dfe8ef;
    border-top-color: #48aa3d;
    border-radius: 50%;
    animation: appointment-loader-spin .75s linear infinite;
}

.appointment-loader[hidden] {
    display: none;
}

.appointment-empty {
    padding: 20px;
    border-radius: 14px;
    color: #657285;
    background: #fff;
}

@keyframes appointment-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

.appointment-specialties {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 34px;
}

.appointment-specialties__group {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
}

.appointment-specialties__group h3 {
    margin: 7px 0 0;
    color: #3a4556;
    font-size: 20px;
    font-weight: 500;
}

.appointment-specialties__list {
    display: grid;
    gap: 8px;
}

.appointment-specialties__list button {
    width: 100%;
    min-height: 38px;
    padding: 8px 14px;
    border: 0;
    border-radius: 999px;
    color: #3b4657;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.appointment-specialties__list button:hover,
.appointment-specialties__list button.is-selected {
    color: #fff;
    background: #48aa3d;
}

.appointment-specialists {
    display: grid;
    gap: 12px;
}

.appointment-specialists-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    margin: 0 0 10px;
    padding: 0 18px;
    color: #3a4556;
    font-size: 16px;
    font-weight: 500;
}

.appointment-specialists-head[hidden] {
    display: none;
}

.appointment-specialists-head span:last-child {
    text-align: right;
    white-space: nowrap;
}

.appointment-specialist {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    width: 100%;
    padding: 16px 18px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: #3b4657;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.appointment-specialist.is-selected {
    border-color: #48aa3d;
    box-shadow: 0 0 0 3px rgba(72, 170, 61, .12);
}

.appointment-specialist strong,
.appointment-specialist small,
.appointment-specialist em {
    display: block;
}

.appointment-specialist strong {
    font-size: 17px;
}

.appointment-specialist small {
    margin-top: 6px;
    color: #657285;
    font-size: 14px;
}

.appointment-specialist em {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    margin-top: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #48aa3d;
    background: #eef8ec;
    font-size: 13px;
    font-style: normal;
    line-height: 1;
}

.appointment-specialist em:empty {
    display: none;
}

.appointment-specialist em:not(:empty)::before {
    content: "\f05a";
    font-family: "Font Awesome 6 Free";
    font-size: 12px;
    font-weight: 900;
}

.appointment-specialist em:hover {
    color: #fff;
    background: #48aa3d;
}

.appointment-specialist b {
    align-self: center;
    color: #3a4556;
    font-weight: 500;
    white-space: nowrap;
}

.appointment-pane__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 40px;
}

.appointment-slot-dates {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.appointment-slot-month {
    padding: 16px;
    border-radius: 18px;
    background: #fff;
}

.appointment-slot-month h3 {
    margin: 0 0 14px;
    color: #3a4556;
    font-size: 18px;
    font-weight: 600;
}

.appointment-slot-weekdays,
.appointment-slot-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.appointment-slot-weekdays {
    margin-bottom: 8px;
}

.appointment-slot-weekdays span {
    color: #657285;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.appointment-slot-day {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    min-width: 0;
    border: 0;
    border-radius: 10px;
    color: #657285;
    background: transparent;
    font-size: 14px;
    line-height: 1;
}

.appointment-slot-day.has-free,
.appointment-slot-day.is-busy-day {
    color: #3a4556;
    background: #eef2f5;
    cursor: pointer;
}

.appointment-slot-day.has-free:hover,
.appointment-slot-day.has-free.is-selected {
    color: #fff;
    background: #48aa3d;
}

.appointment-slot-day.is-busy-day {
    color: #8a2b2b;
    background: #ffe2e2;
}

.appointment-slot-day.is-busy-day.is-selected {
    color: #fff;
    background: #c85d5d;
}

.appointment-slot-day.is-muted,
.appointment-slot-day_empty {
    color: #b7c0ca;
}

.appointment-slot-time-title {
    margin: 20px 0 12px;
    color: #3a4556;
    font-size: 22px;
    font-weight: 500;
}

.appointment-slot-times {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
    gap: 8px;
}

.appointment-slot-times button {
    border: 0;
    border-radius: 999px;
    color: #3b4657;
    background: #fff;
    cursor: pointer;
    min-height: 40px;
}

.appointment-slot-times button.is-selected {
    color: #fff;
    background: #48aa3d;
}

.appointment-slot-times button.is-free {
    background: #8ff0b6;
}

.appointment-slot-times button.is-free.is-selected {
    color: #fff;
    background: #48aa3d;
    box-shadow: 0 0 0 3px rgba(72, 170, 61, .2), 0 10px 20px rgba(72, 170, 61, .22);
}

.appointment-slot-times button.is-busy {
    color: #8a2b2b;
    background: #ff8d8d;
    opacity: .72;
    cursor: not-allowed;
}

.appointment-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 10px;
    max-width: 820px;
    margin-bottom: 28px;
}

.appointment-summary div {
    display: grid;
    align-content: start;
    gap: 7px;
    min-height: 82px;
    padding: 14px 16px;
    border: 1px solid #e3eaf0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(53, 64, 82, .04);
}

.appointment-summary span {
    color: #758195;
    font-size: 13px;
    line-height: 1.25;
}

.appointment-summary strong {
    color: #354052;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.appointment-form {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 22px 20px;
}

.appointment-form label {
    display: grid;
    grid-column: span 2;
    gap: 7px;
}

.appointment-form label:nth-child(4),
.appointment-form label:nth-child(5) {
    grid-column: span 2;
}

.appointment-form label:nth-child(6) {
    grid-column: 1 / -1;
}

.appointment-form span {
    display: block;
    color: #354052;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
}

.appointment-form input:not([type="checkbox"]),
.appointment-form textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 50px;
    padding: 12px 15px;
    border: 1px solid #d8e0e6;
    border-radius: 6px;
    outline: none;
    color: #354052;
    font: inherit;
    background: #f8fafb;
    box-shadow: inset 0 1px 0 rgba(53, 64, 82, .02);
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.appointment-form textarea {
    min-height: 118px;
    resize: vertical;
}

.appointment-form input:not([type="checkbox"])::placeholder,
.appointment-form textarea::placeholder {
    color: #98a2ae;
    opacity: 1;
}

.appointment-form input:not([type="checkbox"]):focus,
.appointment-form textarea:focus {
    border-color: #4aaf45;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(74, 175, 69, .11);
}

.appointment-form small {
    color: #d03333;
    line-height: 1.4;
}

.appointment-form small:empty {
    display: none;
}

.appointment-form .appointment-form__consent {
    display: flex;
    align-items: flex-start;
    grid-column: 1 / -1;
    gap: 9px;
    margin-top: 2px;
    cursor: pointer;
}

.appointment-form__consent input {
    flex: 0 0 auto;
    margin-top: 3px;
    accent-color: #49ae45;
}

.appointment-form__consent span {
    color: #354052;
    font-size: 15px;
    font-weight: 400;
}

.appointment-form__consent a {
    color: #3d9939;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.appointment-form__consent-error {
    grid-column: 1 / -1;
}

.appointment-form__actions {
    display: flex;
    flex-wrap: wrap;
    grid-column: 1 / -1;
    gap: 10px;
    margin-top: 24px;
}

.appointment-form__submit {
    margin: 0;
}

.appointment-success {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 54px 20px;
    text-align: center;
}

.appointment-success i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    color: #fff;
    background: #48aa3d;
}

.appointment-success h2 {
    margin: 0;
    color: #3a4556;
    font-size: 28px;
}

.appointment-success p {
    margin: 0;
    color: #657285;
}

@media (max-width: 980px) {
    .appointment-specialties {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .appointment-page-title {
        font-size: 30px;
    }

    .appointment-shell {
        padding: 18px;
        border-radius: 18px;
    }

    .appointment-shell__top {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .appointment-steps {
        justify-content: flex-start;
        margin-left: 0;
        padding-top: 0;
    }

    .appointment-step-title {
        font-size: 24px;
    }

    .appointment-legend {
        align-items: flex-start;
        flex-direction: column;
    }

    .appointment-legend span {
        max-width: 100%;
        white-space: normal;
    }

    .appointment-pane__top {
        align-items: flex-start;
        flex-direction: column;
    }

    .appointment-specialties,
    .appointment-form {
        grid-template-columns: 1fr;
    }

    .appointment-form label,
    .appointment-form label:nth-child(4),
    .appointment-form label:nth-child(5),
    .appointment-form label:nth-child(6) {
        grid-column: 1 / -1;
    }

    .appointment-specialist {
        grid-template-columns: 1fr;
    }

    .appointment-specialist b {
        display: inline-flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px;
        white-space: normal;
    }

    .appointment-specialist b:not(:empty)::before {
        content: "Ближайшая запись:";
        color: #657285;
        font-size: 13px;
        font-weight: 500;
    }

    .appointment-specialists-head {
        grid-template-columns: 1fr;
    }

    .appointment-specialists-head span:last-child {
        display: none;
    }

    .appointment-summary {
        grid-template-columns: 1fr;
        max-width: none;
        margin-bottom: 22px;
    }

    .appointment-summary div {
        min-height: 0;
    }

    .appointment-slot-dates {
        grid-template-columns: 1fr;
    }
}
