.doctor-review {
    container: doctor-review / inline-size;
    overflow: hidden;
    border: 1px solid #e4ebf6;
    border-radius: 22px;
    background: #fff;
    color: #18264a;
    font-family: IRANSans, YekanBakh-Regular, sans-serif;
}

.doctor-review__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: clamp(14px, 3vw, 24px);
    border-block-end: 1px solid #e4ebf6;
    background: linear-gradient(108deg, #f1fbf9, #f4f7ff 68%);
}

.doctor-review__icon {
    display: grid;
    flex: none;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid #d8e5ff;
    border-radius: 14px;
    background: #fff;
    color: #3156d8;
}

.doctor-review__icon svg {
    width: 23px;
    height: 23px;
}

.doctor-review__header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.65;
}

.doctor-review__header p {
    margin: 3px 0 0;
    color: #52627e;
    font-size: 12px;
    line-height: 1.8;
}

.doctor-review__form {
    display: grid;
    gap: 20px;
    padding: clamp(12px, 3vw, 24px);
}

.doctor-review fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.doctor-review__form h3,
.doctor-review legend,
.doctor-review__fields label {
    margin: 0 0 8px;
    padding: 0;
    color: #18264a;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.8;
}

.doctor-review__ratings,
.doctor-review__options,
.doctor-review__rating-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.doctor-review__rating {
    min-width: 0;
    padding: 10px;
    border: 1px solid #e4ebf6;
    border-radius: 12px;
    background: #f8faff;
}

.doctor-review__rating-options {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
}

.doctor-review__choice {
    position: relative;
    display: block;
    min-width: 0;
    cursor: pointer;
}

.doctor-review__choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.doctor-review__choice > span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    height: 100%;
    padding: 5px 3px;
    border: 1px solid #dce5f4;
    border-radius: 9px;
    background: #fff;
    color: #435371;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

.doctor-review__choice--rating > span {
    flex-direction: column;
    gap: 2px;
    font-weight: 700;
}

.doctor-review__choice svg {
    width: 15px;
    height: 15px;
    color: #6d82a9;
}

.doctor-review__choice:hover > span {
    border-color: #899ff0;
}

.doctor-review__choice input:checked + span {
    border-color: #3658df;
    background: #ecf1ff;
    color: #2344ba;
    box-shadow: inset 0 0 0 1px #3658df;
    font-weight: 700;
}

.doctor-review__choice input:checked + span svg {
    fill: #fbd465;
    color: #8d5905;
}

.doctor-review__choice input:focus-visible + span,
.doctor-review__submit:focus-visible,
.doctor-review__clear:focus-visible,
.doctor-review__fields input:focus-visible,
.doctor-review__fields textarea:focus-visible {
    outline: 2px solid #3156d8;
    outline-offset: 2px;
}

.doctor-review__optional {
    margin-inline-start: 4px;
    color: #52627e;
    font-size: 11px;
    font-weight: 400;
}

.doctor-review__clear {
    margin-top: 8px;
    color: #2344ba;
    font-size: 12px;
    text-decoration: underline;
}

.doctor-review__fields {
    display: grid;
    gap: 6px;
}

.doctor-review__fields label {
    margin: 0;
}

.doctor-review__fields label:not(:first-child) {
    margin-top: 7px;
}

.doctor-review__fields input,
.doctor-review__fields textarea {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #dce5f4;
    border-radius: 10px;
    background: #fcfdff;
    color: #18264a;
    font-size: 13px;
    line-height: 1.8;
}

.doctor-review__fields textarea {
    resize: vertical;
}

.doctor-review__count {
    margin: 0;
    color: #52627e;
    font-size: 11px;
    text-align: end;
}

.doctor-review__footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 14px;
    border-top: 1px solid #e4ebf6;
}

.doctor-review__submit {
    min-width: 132px;
    min-height: 46px;
    padding: 8px 18px;
    border-radius: 11px;
    background: #2e4fd2;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

.doctor-review__submit:not(:disabled):hover {
    background: #2543bb;
}

.doctor-review__submit:disabled {
    cursor: progress;
    opacity: .7;
}

@container doctor-review (max-width: 640px) {
    .doctor-review__ratings {
        grid-template-columns: minmax(0, 1fr);
    }

    .doctor-review__submit {
        width: 100%;
    }
}
