#container-specialist-profile {
    height: auto;
    overflow: visible;
    margin-bottom: 24px;
}

#container-specialist-profile > .form-title {
    display: flex;
    align-items: center;
    position: relative;
}

#container-specialist-profile > .form-title:not(.specialist-profile-form-title) {
    justify-content: center;
    padding: 0 40px;
}

#specialist-profile-back {
    width: 20px;
    height: 20px;
    padding: 12px 16px;
    position: absolute;
    left: calc(40px - 16px);
    top: calc(24px - 12px);
    opacity: .5;
    transition: .15s all;
    cursor: pointer;
}

@media (hover: hover) {
    #specialist-profile-back:hover {
        opacity: 1;
    }
}

@media (hover: none) {
    #specialist-profile-back:active {
        opacity: 1;
    }
}

#container-specialist-profile .specialist-profile-form-title {
    height: 64px;
    justify-content: space-between;
    gap: 16px;
    padding: 0 40px;
}

#container-specialist-profile .specialist-profile-form-title p {
    text-align: left;
}

.specialist-profile-card {
    width: 100%;
    box-sizing: border-box;
}

.specialist-profile-card_form {
    padding: 18px 0 18px 54px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 17px 52px;
}

.specialist-profile-card_form .input-block {
    height: auto;
}

.specialist-profile-access-form {
    padding: 18px 54px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.specialist-profile-help {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border: 1px solid rgba(189, 146, 206, 0.6);
    border-radius: 50%;
    background: #ffffff;
    color: #9b7aa7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    cursor: help;
    position: relative;
}

.specialist-profile-help_header {
    position: absolute;
    top: 50%;
    right: 40px;
    transform: translateY(-50%);
}

.specialist-profile-help_inline {
    width: 24px;
    height: 24px;
    min-width: 24px;
    font-size: 14px;
    flex-shrink: 0;
}

.specialist-profile-help::after {
    content: attr(data-tooltip);
    width: min(320px, calc(100vw - 48px));
    padding: 12px 14px;
    border-radius: 14px;
    background: #241a2b;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.45;
    text-transform: none;
    letter-spacing: normal;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    box-shadow: 0 18px 40px rgba(36, 26, 43, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
    z-index: 5;
    pointer-events: none;
}

.specialist-profile-help:hover::after,
.specialist-profile-help:focus-visible::after,
.specialist-profile-help.specialist-profile-help_open::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.specialist-profile-help:focus-visible,
.specialist-profile-help.specialist-profile-help_open {
    outline: 2px solid rgba(189, 146, 206, 0.6);
    outline-offset: 2px;
}

.specialist-profile-inline-action {
    width: auto;
    height: auto;
    min-height: 0;
    margin-top: 8px;
    padding: 0;
    border: none;
    background: transparent;
    color: #8a6a98 !important;
    font-size: 14px;
    line-height: 1.35;
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (hover: hover) {
    .specialist-profile-inline-action:hover {
        background: transparent;
        color: #5f436d !important;
    }
}

@media (hover: none) {
    .specialist-profile-inline-action:active {
        background: transparent;
        color: #5f436d !important;
    }
}

.specialist-profile-access-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.specialist-profile-access-group + .specialist-profile-access-group {
    padding-top: 16px;
    border-top: 1px solid rgba(189, 146, 206, 0.25);
}

.specialist-profile-access-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.specialist-profile-access-row_start {
    justify-content: flex-start;
}

.specialist-profile-access-row_packages {
    align-items: center;
}

.specialist-profile-status-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.specialist-profile-status-toggle {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(189, 146, 206, 0.32);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fcf9fe 100%);
    box-sizing: border-box;
}

.specialist-profile-status-toggle__button {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.72);
    color: #5f436d !important;
    text-align: center;
    box-sizing: border-box;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.specialist-profile-status-toggle__button:hover,
.specialist-profile-status-toggle__button:focus-visible {
    background: rgba(244, 238, 248, 0.9);
    border-color: rgba(189, 146, 206, 0.28);
    color: #241a2b !important;
}

.specialist-profile-status-toggle__button_active {
    background: linear-gradient(180deg, rgba(230, 249, 243, 0.96) 0%, rgba(218, 244, 236, 0.96) 100%);
    color: #241a2b !important;
    border-color: transparent;
    box-shadow: none;
}

.specialist-profile-status-toggle__label {
    display: block;
    width: 100%;
    font-size: 14px;
    line-height: 1.15;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.specialist-profile-status-toggle__button::after {
    content: attr(data-status-hint);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(4px);
    min-width: 140px;
    max-width: min(260px, calc(100vw - 48px));
    padding: 8px 10px;
    border: 1px solid rgba(189, 146, 206, 0.32);
    border-radius: 12px;
    background: #ffffff;
    color: #5f436d;
    font-size: 12px;
    line-height: 1.35;
    text-align: center;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
    z-index: 4;
}

.specialist-profile-status-toggle__button::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);
    width: 10px;
    height: 10px;
    border-right: 1px solid rgba(189, 146, 206, 0.32);
    border-bottom: 1px solid rgba(189, 146, 206, 0.32);
    background: #ffffff;
    transform: translateX(-50%) rotate(45deg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 4;
}

.specialist-profile-status-toggle__button:hover::after,
.specialist-profile-status-toggle__button:hover::before,
.specialist-profile-status-toggle__button:focus-visible::after,
.specialist-profile-status-toggle__button:focus-visible::before {
    opacity: 1;
    visibility: visible;
}

.specialist-profile-status-toggle__button:hover::after,
.specialist-profile-status-toggle__button:focus-visible::after {
    transform: translateX(-50%) translateY(0);
}

.specialist-profile-status-toggle__button:focus-visible {
    outline: 2px solid rgba(189, 146, 206, 0.48);
    outline-offset: 2px;
}

.specialist-profile-status-delete {
    flex: 0 0 42px;
    width: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(189, 146, 206, 0.32);
    border-radius: 13px;
    background: #ffffff;
    color: #5f436d;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.specialist-profile-status-delete:hover,
.specialist-profile-status-delete:focus-visible {
    border-color: rgba(189, 146, 206, 0.58);
    background: rgba(244, 238, 248, 0.58);
    color: #241a2b;
}

.specialist-profile-status-delete:disabled {
    opacity: 0.6;
    cursor: wait;
}

.specialist-profile-status-delete__icon {
    width: 18px;
    height: 18px;
}

.specialist-package-option {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.specialist-package-option__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.specialist-package-option__row .specialist-input__checkbox-wrapper {
    flex: 1;
    min-width: 0;
}

.specialist-package-options {
    display: grid;
    gap: 12px;
}

.specialist-package-options .specialist-input__checkbox-wrapper,
.specialist-modal__diagnostics-container .specialist-input__checkbox-wrapper {
    align-items: flex-start;
}

.specialist-package-options .specialist-input__checkbox-wrapper label,
.specialist-modal__diagnostics-container .specialist-input__checkbox-wrapper label {
    cursor: pointer;
}

.specialist-conclusion-mode-preview {
    margin-top: 4px;
    padding: 12px 14px;
    border: 1px solid rgba(189, 146, 206, 0.32);
    border-radius: 12px;
    background: #faf6fc;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.specialist-conclusion-mode-preview__title {
    color: #8a6a98;
}

.specialist-conclusion-mode-preview__value {
    color: #241a2b;
}

.specialist-conclusion-mode-preview__hint {
    color: #5f436d;
}

.specialist-conclusion-mode-preview[data-conclusion-mode="premium"] {
    border-color: rgba(102, 202, 165, 0.45);
    background: #f3fcf8;
}

.specialist-conclusion-mode-preview[data-conclusion-mode="basic"] {
    border-color: rgba(241, 205, 33, 0.45);
    background: #fffdf4;
}

.specialist-conclusion-mode-preview[data-conclusion-mode="deny"] {
    border-color: rgba(187, 143, 205, 0.4);
    background: #f8f4fb;
}

.specialist-profile-package-summary {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.specialist-profile-inline-label {
    font-size: 13px;
    line-height: 1.3;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a6a98;
}

.specialist-profile-text_muted {
    color: #8e8e95;
}

#container-specialist-profile .specialist-modal__diagnostics-container {
    display: grid;
    gap: 14px;
    width: 100%;
    max-height: none;
    padding: 0;
    border: none;
    background: none;
    overflow: visible;
}

.specialist-input__checkbox-copy {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    gap: 4px;
}

.specialist-diagnostic-label-row {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.specialist-diagnostic-label-row label {
    flex: 1 1 auto;
    min-width: 0;
}

.specialist-diagnostic-label-row .specialist-diagnostic-help {
    flex: 0 0 auto;
    margin-top: 1px;
}

.specialist-diagnostics-meta {
    font-size: 14px;
    line-height: 1.35;
    color: #8a6a98;
}

.specialist-input__checkbox-wrapper_locked .specialist-input-checkbox {
    background-color: rgba(189, 146, 206, 0.16);
}

#container-specialist-profile .specialist-modal__error {
    margin-bottom: 0;
    text-align: left;
}

.specialist-profile-actions {
    justify-content: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.specialist-profile-actions button {
    width: min(240px, 100%);
}

.specialist-profile-button_secondary {
    background: #ffffff;
    border: 1px solid var(--border);
}

#container-specialist-profile .change-password__error {
    max-width: 520px;
}
