/**
 * ID Panel - Public Styles
 */

/* === Верхняя панель ID (единый хедер сайта, дизайн 2026-08-30) === */
@import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700;800&display=swap');

:root {
    --id-panel-brand-blue: #205ea3;
    --id-panel-brand-blue-dark: #164a82;
    --id-panel-text-dark: #16202b;
    --id-panel-text-muted: #5b6b7c;
    --id-panel-border-light: #e6ebf1;
}

/* Высота панели зафиксирована явно (72px), а не собирается из паддингов —
   это единственное число, с которым должен точно совпадать padding-top
   тела страницы ниже. Раньше высота подбиралась на глаз (~68px факт против
   74px в body), из-за расхождения между фоном панели и фоном лендинга
   просвечивала тонкая полоска фона body. */
.id-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: #ffffff;
    color: var(--id-panel-text-dark);
    padding: 0;
    z-index: 9999;
    border-bottom: 1px solid var(--id-panel-border-light);
    box-shadow: none;
    font-family: 'Onest', -apple-system, BlinkMacSystemFont, sans-serif;
}

.id-panel__container {
    box-sizing: border-box;
    max-width: 1180px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 20px;
}

/* .id-panel__right оборачивает <nav> + .id-panel__content (2026-11-02,
   добавлено вместе с "Resources"-дропдауном) — единственный держатель
   margin-left:auto. Раньше это свойство стояло прямо на .id-panel__nav
   (см. историю правок 2026-09-28: если поставить auto сразу на два
   элемента, flexbox поделит свободное место пополам и меню повиснет
   где-то в середине шапки) — теперь nav и content два РАЗНЫХ по сути,
   но визуально единых блока внутри одной обёртки, поэтому auto переехал
   на неё, а сами nav/content просто обычные flex-дети внутри. */
.id-panel__right {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: auto;
}

.id-panel__nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.id-panel__nav a {
    display: flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: var(--id-panel-text-muted);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

.id-panel__nav a:hover {
    color: var(--id-panel-brand-blue);
}

/* Иконки у ВСЕХ пунктов nav (2026-11-03) — раньше их имел только
   Resources-дропдаун (Blog/News/Q&A/Tests), а Courses/Methodology/
   Certification/FAQ шли голым текстом. На десктопе это было почти не
   заметно, но на мобильном весь nav сворачивается в один список внутри
   гамбургера, и там разница между "с иконкой"/"без иконки" читалась как
   два разных по важности набора пунктов без объяснения — общий набор
   иконок убирает эту несогласованность. */
.id-panel__nav-icon {
    display: inline-flex;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    color: var(--id-panel-brand-blue);
}

.id-panel__nav-icon svg {
    width: 100%;
    height: 100%;
}

/* "Resources" dropdown (Blog/News/Q&A/Tests), 2026-11-02 — same open/close
   pattern as .id-panel__lang-switcher below (trigger button + absolute
   popover), grouped so the flat top-level nav stays at 5 items instead of
   8 once Tests was added (see panel.php for why). */
.id-panel__resources {
    position: relative;
}

.id-panel__resources-trigger {
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

/* ВСЁ оформление (display/фон/рамка/отступы/цвет) — по #id, не по .классу.
   Тема красит ЛЮБОЙ голый <button> через высокоспецифичный Customizer-
   селектор `button:not(.components-button):not([class*="elementor"])
   :not([class*="interactive"])` (specificity 0,3,1 — три :not() с
   классом/атрибутом внутри каждый считаются как класс) — это специфичнее
   одного классового селектора (0,1,0), включая display:inline-block и
   padding:12px 24px, не только фон (тот же баг уже документирован у
   #id-panel-lang-trigger чуть ниже; здесь он же бил ещё и display/padding,
   не только цвет — подтвердилось вычислением getComputedStyle в живом
   браузере, 2026-11-02). ID-селектор (1,0,0) всегда выигрывает у любого
   числа :not()-классов/атрибутов, без !important. */
#id-panel-resources-trigger {
    display: flex;
    background: none;
    border: none;
    padding: 0;
    color: var(--id-panel-text-muted);
}

#id-panel-resources-trigger:hover {
    background: none;
    color: var(--id-panel-brand-blue);
}

.id-panel__resources-chevron {
    font-size: 10px;
    transition: transform 0.15s;
}

.id-panel__resources-trigger[aria-expanded="true"] .id-panel__resources-chevron {
    transform: rotate(180deg);
}

.id-panel__resources-menu {
    display: none;
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border: 1px solid var(--id-panel-border-light);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(22, 32, 43, 0.12);
    padding: 8px;
    min-width: 190px;
    z-index: 10000;
}

.id-panel__resources-menu--open {
    display: block;
}

.id-panel__resources-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 7px;
    color: var(--id-panel-text-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.id-panel__resources-menu a:hover {
    background: rgba(32, 94, 163, 0.07);
    color: var(--id-panel-brand-blue);
}

.id-panel__resources-icon {
    display: inline-flex;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    color: var(--id-panel-brand-blue);
}

.id-panel__resources-icon svg {
    width: 100%;
    height: 100%;
}

/* Акционное сообщение */
.id-panel__promo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    flex: 1;
    max-width: 600px;
}

.id-panel__promo--info {
    background: rgba(52, 152, 219, 0.15);
    border-left: 3px solid #3498db;
}

.id-panel__promo--success {
    background: rgba(46, 204, 113, 0.15);
    border-left: 3px solid #2ecc71;
}

.id-panel__promo--warning {
    background: rgba(241, 196, 15, 0.15);
    border-left: 3px solid #f1c40f;
}

.id-panel__promo--promo {
    background: rgba(231, 76, 60, 0.15);
    border-left: 3px solid #e74c3c;
    animation: pulse-promo 2s ease-in-out infinite;
}

@keyframes pulse-promo {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.id-panel__promo-text {
    flex: 1;
    color: #fff;
}

.id-panel__promo-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 14px;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
}

.id-panel__promo-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.id-panel__content {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Переключатель языков (Polylang) — выпадающее меню с флагами (2026-09-22) */
.id-panel__lang-switcher {
    position: relative;
}

.id-panel__lang-trigger {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 100px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s, border-color 0.2s;
}

/*
 * Цвет/фон/рамка вынесены в правило по #id, а не по .классу — тема
 * (custom-css.php, настройка Customizer "Кнопки") генерит динамический CSS
 * вида `button:not(.components-button):not([class*="elementor"]):
 * not([class*="interactive"]) { background-color: <синий из настроек> }`.
 * Специфичность трёх :not() с классом/атрибутом внутри (0,3,1) выше, чем у
 * одного классового селектора (0,1,0) — синяя тема-кнопка перебивала
 * задуманный прозрачный/белый вид триггера (найдено по жалобе пользователя
 * "синяя плашка на выборе языка", 2026-09-22). ID-селектор (1,0,0) всегда
 * выигрывает у любого числа классов/атрибутов, поэтому фикс — здесь, а не
 * через !important.
 */
#id-panel-lang-trigger {
    background: transparent;
    border: 1px solid var(--id-panel-border-light);
    color: var(--id-panel-text-dark);
}

#id-panel-lang-trigger:hover {
    background: #f5f7fa;
}

.id-panel__lang-flag {
    display: inline-block;
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.id-panel__lang-code {
    letter-spacing: 0.02em;
}

.id-panel__lang-chevron {
    font-size: 10px;
    color: var(--id-panel-text-muted);
    transition: transform 0.2s;
    margin-left: 1px;
}

.id-panel__lang-trigger[aria-expanded="true"] .id-panel__lang-chevron {
    transform: rotate(180deg);
}

.id-panel__lang-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border: 1px solid var(--id-panel-border-light);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(22, 32, 43, 0.14);
    min-width: 175px;
    padding: 6px;
    z-index: 10001;
}

.id-panel__lang-menu--open {
    display: block;
}

.id-panel__lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--id-panel-text-dark);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s;
}

.id-panel__lang-option:hover {
    background: #f5f7fa;
}

.id-panel__lang-option--active {
    background: rgba(32, 94, 163, 0.08);
    color: var(--id-panel-brand-blue);
    font-weight: 700;
}

.id-panel__lang-option .id-panel__lang-flag {
    width: 22px;
    height: 16px;
}

.id-panel__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.id-panel__logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}

.id-panel__logo img {
    display: block;
    max-width: 200px;
    width: auto;
    object-fit: contain;
    transition: opacity 0.2s;
}

.id-panel__logo a:hover img {
    opacity: 0.85;
}

.id-panel__logo a:hover {
    color: var(--id-panel-brand-blue);
}

.id-panel__user,
.id-panel__guest {
    display: flex;
    align-items: center;
    gap: 15px;
}

.id-panel__user-name {
    font-size: 14px;
    color: var(--id-panel-text-muted);
    font-weight: 500;
}

.id-panel__btn {
    background: var(--id-panel-brand-blue);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 100px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.2s;
}

.id-panel__btn:hover {
    background: var(--id-panel-brand-blue-dark);
}

.id-panel__btn--products {
    background: transparent;
    color: var(--id-panel-text-dark);
    border: 1px solid var(--id-panel-border-light);
}

.id-panel__btn--products:hover {
    background: #f5f7fa;
}

.id-panel__btn--cabinet {
    background: transparent;
    color: var(--id-panel-text-dark);
    border: 1px solid var(--id-panel-border-light);
    text-decoration: none;
    display: inline-block;
}

.id-panel__btn--cabinet:hover {
    background: #f5f7fa;
    color: var(--id-panel-text-dark);
}

.id-panel__btn--logout {
    background: transparent;
    color: var(--id-panel-text-muted);
    border: 1px solid var(--id-panel-border-light);
}

.id-panel__btn--logout:hover {
    background: #f5f7fa;
    color: var(--id-panel-text-dark);
}

/* Кнопка-гамбургер для мобильного меню */
.id-panel-mobile-toggle {
    display: none !important;
    background: transparent;
    border: 1px solid var(--id-panel-border-light);
    color: var(--id-panel-text-dark);
    font-size: 20px;
    line-height: 1;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.id-panel-mobile-toggle:hover {
    background: #f5f7fa;
}

/* === Модальные окна === */
.id-panel-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100001;
    background: rgba(0,0,0,0.7);
}

.id-panel-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.id-panel-modal__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2;
}

body.id-panel-active .id-panel-modal__content {
    top: calc(50% + 30px);
    max-height: calc(90vh - 60px);
}

body.id-panel-active.admin-bar .id-panel-modal__content {
    top: calc(50% + 46px);
    max-height: calc(90vh - 92px);
}

.id-panel-modal__content--large {
    max-width: 800px;
}

.id-panel-modal__close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
}

.id-panel-modal__close:hover {
    color: #333;
}

/* === Авторизация === */
.id-panel-auth__tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #ecf0f1;
}

.id-panel-auth__tab {
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 16px;
    color: #7f8c8d;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}

.id-panel-auth__tab:hover {
    color: #2c3e50;
}

.id-panel-auth__tab--active {
    color: #2c3e50;
    border-bottom-color: #3498db;
    font-weight: 600;
}

.id-panel-auth__content {
    display: none;
}

.id-panel-auth__content--active {
    display: block;
}

/* === Формы === */
.id-panel-form__message {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.id-panel-form__message--error {
    background: #fee;
    color: #c0392b;
    border: 1px solid #fcc;
}

.id-panel-form__message--success {
    background: #efe;
    color: #27ae60;
    border: 1px solid #cfc;
}

.id-panel-form__field {
    margin-bottom: 20px;
}

.id-panel-form__field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
}

.id-panel-form__field input[type="text"],
.id-panel-form__field input[type="email"],
.id-panel-form__field input[type="password"],
.id-panel-form__field input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.id-panel-form__field input:focus {
    outline: none;
    border-color: #3498db;
}

.id-panel-form__field--checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}

.id-panel-form__field--consent {
    margin-bottom: 16px;
}

.id-panel-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    font-weight: normal;
    line-height: 1.4;
    color: #5a6b7a;
    cursor: pointer;
}

.id-panel-consent-label input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 2px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.id-panel-consent-label a {
    color: #3498db;
    text-decoration: underline;
}

.id-panel-consent-label a:hover {
    color: #217dbb;
}

.id-panel-form__actions {
    margin-top: 25px;
}

.id-panel-form__footer {
    margin-top: 15px;
    text-align: center;
}

.id-panel-form__divider {
    margin: 20px 0;
    text-align: center;
    position: relative;
}

.id-panel-form__divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #ddd;
}

.id-panel-form__divider span {
    position: relative;
    background: #fff;
    padding: 0 15px;
    color: #666;
    font-size: 13px;
}

/* OAuth кнопки */
.id-panel-oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.id-panel-oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.id-panel-oauth-btn:hover {
    background: #f8f9fa;
    border-color: #ccc;
}

.id-panel-oauth-btn__icon {
    font-size: 18px;
    font-weight: bold;
}

.id-panel-oauth-btn__text {
    color: #333;
}

.id-panel-oauth-btn--mailru {
    border-color: #168DE2;
}

.id-panel-oauth-btn--mailru:hover {
    background: #f0f7ff;
    border-color: #168DE2;
}

.id-panel-oauth-btn--mailru .id-panel-oauth-btn__icon {
    color: #168DE2;
}

.id-panel-oauth-btn--yandex {
    border-color: #FC3F1D;
}

.id-panel-oauth-btn--yandex:hover {
    background: #fff5f4;
    border-color: #FC3F1D;
}

.id-panel-oauth-btn--yandex .id-panel-oauth-btn__icon {
    color: #FC3F1D;
}

.id-panel-oauth-btn--google {
    border-color: #4285F4;
}

.id-panel-oauth-btn--google:hover {
    background: #f0f5ff;
    border-color: #4285F4;
}

.id-panel-oauth-btn--google .id-panel-oauth-btn__icon {
    color: #4285F4;
}

.id-panel-btn {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}

.id-panel-btn:hover {
    background: #2980b9;
}

.id-panel-btn--primary {
    background: #3498db;
}

.id-panel-btn--secondary {
    background: #95a5a6;
}

.id-panel-btn--secondary:hover {
    background: #7f8c8d;
}

.id-panel-btn--full {
    width: 100%;
}

.id-panel-link {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
}

.id-panel-link:hover {
    text-decoration: underline;
}

/* Кнопка-ссылка (без рамки/фона) */
.id-panel-link--btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline;
}

/* Обёртка поля пароля с кнопкой-глазом */
.id-panel-password-wrap {
    position: relative;
}

.id-panel-password-wrap input[type="password"],
.id-panel-password-wrap input[type="text"] {
    padding-right: 42px !important;
    width: 100%;
}

.id-panel-password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #7f8c8d;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.id-panel-password-toggle:hover {
    color: #2c3e50;
}

/* Экран восстановления пароля */
.id-panel-auth__back {
    margin-bottom: 16px;
}

.id-panel-auth__desc {
    font-size: 14px;
    color: #555;
    margin: 0 0 20px;
    line-height: 1.55;
}

.id-panel-reset-success {
    text-align: center;
    padding: 20px 10px;
}

.id-panel-reset-success__icon {
    font-size: 48px;
    margin-bottom: 12px;
    line-height: 1;
}

.id-panel-reset-success__title {
    font-size: 18px;
    font-weight: 700;
    color: #27ae60;
    margin: 0 0 10px;
}

.id-panel-reset-success__text {
    font-size: 14px;
    color: #555;
    margin: 0 0 24px;
    line-height: 1.6;
}

/* === OAuth кнопки === */
.id-panel-form__divider {
    margin: 20px 0;
    text-align: center;
    position: relative;
}

.id-panel-form__divider::before,
.id-panel-form__divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #ddd;
}

.id-panel-form__divider::before {
    left: 0;
}

.id-panel-form__divider::after {
    right: 0;
}

.id-panel-form__divider span {
    background: #fff;
    padding: 0 10px;
    color: #666;
    font-size: 13px;
}

.id-panel-oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.id-panel-oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    width: 100%;
}

.id-panel-oauth-btn:hover {
    background: #f8f9fa;
    border-color: #ccc;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.id-panel-oauth-btn__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 16px;
}

.id-panel-oauth-btn--mailru .id-panel-oauth-btn__icon {
    background: #168DE2;
    color: #fff;
}

.id-panel-oauth-btn--mailru:hover {
    border-color: #168DE2;
}

.id-panel-oauth-btn--yandex .id-panel-oauth-btn__icon {
    background: #FC3F1D;
    color: #fff;
}

.id-panel-oauth-btn--yandex:hover {
    border-color: #FC3F1D;
}

.id-panel-oauth-btn--google .id-panel-oauth-btn__icon {
    background: #4285F4;
    color: #fff;
}

.id-panel-oauth-btn--google:hover {
    border-color: #4285F4;
}

.id-panel-oauth-btn__text {
    color: #333;
}

/* === Продукты === */
.id-panel-products__title {
    margin: 0 0 25px 0;
    font-size: 24px;
    color: #2c3e50;
}

.id-panel-products__loading {
    text-align: center;
    padding: 40px 20px;
}

.id-panel-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.id-panel-product {
    border: 1px solid #ecf0f1;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 15px;
    transition: box-shadow 0.3s;
}

.id-panel-product:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.id-panel-product__header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.id-panel-product__title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.id-panel-product__status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.id-panel-product__status--active {
    background: #d4edda;
    color: #155724;
}

.id-panel-product__status--demo {
    background: #fff3cd;
    color: #856404;
}

.id-panel-product__status--inactive {
    background: #f8d7da;
    color: #721c24;
}

.id-panel-product__info {
    margin-bottom: 15px;
    font-size: 14px;
    color: #7f8c8d;
}

.id-panel-product__actions {
    display: flex;
    gap: 10px;
}

.id-panel-product__actions .id-panel-btn {
    padding: 8px 16px;
    font-size: 13px;
}

/* === Сообщения об отсутствии доступа === */
.id-panel-no-access {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    margin: 40px 0;
}

.id-panel-no-access__icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.id-panel-no-access__title {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.id-panel-no-access__text {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 25px;
}

.id-panel-no-access__actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* === Таймер демо-доступа === */
.id-panel-demo-timer {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.id-panel-demo-timer__icon {
    font-size: 24px;
}

.id-panel-demo-timer__content {
    flex: 1;
}

.id-panel-demo-timer__time {
    font-weight: 600;
    color: #856404;
}

.id-panel-demo-timer__upgrade {
    background: #ffc107;
    color: #000;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.3s;
}

.id-panel-demo-timer__upgrade:hover {
    background: #e0a800;
}

/* === Резервная страница === */
.id-panel-auth-page {
    max-width: 500px;
    margin: 50px auto;
    padding: 20px;
}

.id-panel-auth-page__container {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.id-panel-auth-page__tab {
    display: none;
}

.id-panel-auth-page__tab--active {
    display: block;
}

.id-panel-auth-page__switch {
    margin-top: 20px;
    text-align: center;
}

.id-panel-message {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.id-panel-message--error {
    background: #fee;
    color: #c0392b;
    border: 1px solid #fcc;
}

.id-panel-message--success {
    background: #efe;
    color: #27ae60;
    border: 1px solid #cfc;
}

/* === Адаптивность === */
@media (max-width: 768px) {
    .id-panel__container {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 15px;
        position: relative;
    }

    .id-panel__logo {
        order: -1;
        align-self: center;
        margin-right: auto;
    }

    .id-panel__logo img {
        max-height: 38px !important;
        max-width: 160px;
    }

    .id-panel__promo {
        order: 2;
        flex: 1 1 100%;
        max-width: 100%;
    }

    /* Гамбургер-меню вместо кнопок входа/выхода */
    .id-panel-mobile-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        order: 1;
        margin-left: auto;
    }

    /* .id-panel__right — единая "плавающая карточка" гамбургер-меню
       (2026-11-02). Раньше этот набор свойств (position:absolute + фон +
       рамка + тень) висел прямо на .id-panel__content, а <nav> просто был
       display:none и НИКОГДА не показывался на мобильном в принципе — ни
       один из пунктов Courses/Methodology/.../Blog/News/Q&A не был
       доступен на телефоне иначе как через прямые ссылки с других страниц.
       Теперь wrapper несёт всё оформление карточки, а nav и content внутри
       — просто два вертикальных блока друг под другом, разделённые
       границей. */
    .id-panel__right {
        order: 3;
        display: none;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: 100%;
        right: 15px;
        margin: 8px 0 0;
        background: #ffffff;
        border: 1px solid var(--id-panel-border-light);
        padding: 12px;
        border-radius: 10px;
        box-shadow: 0 8px 24px rgba(22, 32, 43, 0.12);
        z-index: 10000;
        min-width: 220px;
        max-width: calc(100vw - 30px);
    }

    #id-panel.id-panel--mobile-open .id-panel__right {
        display: flex;
    }

    .id-panel__nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding-bottom: 10px;
        margin-bottom: 10px;
        border-bottom: 1px solid var(--id-panel-border-light);
    }

    .id-panel__nav > a {
        padding: 9px 4px;
    }

    /* "Resources" перестаёт быть дропдауном на мобильном — вложенный
       поповер внутри уже открытой гамбургер-панели означал бы двойной тап
       для доступа к Blog/News/Q&A/Tests, поэтому триггер скрыт, а пункты
       меню всегда развёрнуты инлайн (тот же приём, что уже применён ниже
       к .id-panel__lang-menu). По #id, не по .классу — см. комментарий
       у #id-panel-resources-trigger выше про тему, иначе display:none
       проигрывает её :not()-селектору и кнопка остаётся видимой. */
    #id-panel-resources-trigger {
        display: none;
    }

    .id-panel__resources-menu {
        display: flex !important;
        flex-direction: column;
        position: static;
        /* left:50%+transform:translateX(-50%) из десктоп-версии центрируют
           поповер под кнопкой через ЕГО СОБСТВЕННУЮ ширину — transform не
           перестаёт действовать сам по себе просто от смены position на
           static (это два независимых свойства), и без явного сброса меню
           уезжало на ~94px левее положенного и вываливалось за левый край
           карточки (найдено живым замером getBoundingClientRect, 2026-11-02:
           x:71 вместо x родителя 155). */
        left: auto;
        transform: none;
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
        min-width: 0;
    }

    .id-panel__resources-menu a {
        padding: 9px 4px 9px 18px;
    }

    .id-panel__content {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .id-panel__lang-switcher {
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--id-panel-border-light);
    }

    .id-panel__lang-trigger {
        width: 100%;
        justify-content: center;
    }

    /* На мобильном меню разворачивается ИНЛАЙН под кнопкой, а не поверх
       (position:absolute), — сама мобильная панель и так узкая абсолютная
       плашка, вложенный абсолютный дропдаун внутри неё выглядел бы криво. */
    .id-panel__lang-menu {
        position: static;
        border: none;
        box-shadow: none;
        margin-top: 6px;
        padding: 0;
    }

    .id-panel__user,
    .id-panel__guest {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .id-panel__btn {
        width: 100%;
        text-align: center;
    }

    .id-panel-modal__content {
        width: 95%;
        padding: 20px;
    }
    
    .id-panel-no-access {
        padding: 20px;
    }
    
    .id-panel-no-access__actions {
        flex-direction: column;
    }
    
    .id-panel-product__actions {
        flex-direction: column;
    }
}

/* === Отступ для контента сайта === */

/* Защита от горизонтального скролла, если контент страницы шире вьюпорта
   (например, слишком широкая секция Elementor) — без этого зафиксированная
   панель ID визуально "съезжает" вместе со страницей на мобильных. */
/* overflow-x: hidden убран целиком (был раньше и на html, и на body) --
   оказалось, что просто дописать overflow-y: visible рядом НЕ помогает:
   по спецификации CSS Overflow Module, если computed overflow-x не visible,
   а overflow-y visible, браузер принудительно подменяет overflow-y на auto
   -- это правило действует даже когда overflow-y задан явно, а не просто
   не задан. Из-за этого html/body становились скролл-контейнерами, и ЛЮБОЙ
   position: sticky где угодно на сайте переставал прилипать (nearest
   scrolling ancestor находится раньше настоящего вьюпорта, а его
   собственный scrollTop никогда не меняется, раз реальный скролл страницы
   идёt на html, а не на body). Единственный рабочий вариант — не задавать
   overflow-x на body/html вообще. Если где-то на сайте появится
   горизонтальный скролл от слишком широкого элемента (упомянутый в
   исходном комментарии сценарий с Elementor -- на этом сайте Elementor не
   используется), чинить это на уровне конкретного элемента
   (max-width: 100%), а не глобально на body/html. Найдено и починено
   2026-09-16 на прилипающем меню вкладок личного кабинета. */
html {
    max-width: 100%;
}

body.id-panel-active {
    padding-top: 72px !important;
    margin-top: 0 !important;
    max-width: 100%;
}

body.id-panel-active > #page {
    opacity: 1 !important;
}

body.id-panel-active.admin-bar {
    padding-top: 104px !important;
}

body.admin-bar .id-panel {
    top: 32px;
}

/* Убираем возможные зазоры — прячем пустые header/footer темы */
body.id-panel-active > #page > .site-header-hidden,
body.id-panel-active > #page > .site-footer-hidden {
    display: none !important;
}

body.id-panel-active > :first-child:not(.id-panel) {
    margin-top: 0 !important;
}

/* ===================================================================
   Cookie Banner
   =================================================================== */

.id-panel-cookie {
    position: fixed;
    z-index: 99998;
    left: 0;
    right: 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
    transition: transform 0.35s ease, opacity 0.35s ease;
}

/* Позиции */
.id-panel-cookie--bottom,
.id-panel-cookie--bottom-left,
.id-panel-cookie--bottom-right {
    bottom: 0;
}
.id-panel-cookie--top {
    top: 0;
    bottom: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.id-panel-cookie--bottom-left  { right: auto; max-width: 460px; border-radius: 8px 8px 0 0; }
.id-panel-cookie--bottom-right { left:  auto; max-width: 460px; border-radius: 8px 8px 0 0; }

/* Анимация появления */
.id-panel-cookie[hidden] { display: none; }
.id-panel-cookie--visible {
    animation: cookieBannerIn 0.4s ease forwards;
}
@keyframes cookieBannerIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
.id-panel-cookie--top.id-panel-cookie--visible {
    animation: cookieBannerInTop 0.4s ease forwards;
}
@keyframes cookieBannerInTop {
    from { opacity: 0; transform: translateY(-30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.id-panel-cookie__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 24px;
}

/* Основной блок */
.id-panel-cookie__main {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.id-panel-cookie__content {
    flex: 1;
    min-width: 200px;
}
.id-panel-cookie__title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.3;
}
.id-panel-cookie__text {
    font-size: 13px;
    margin: 0;
    line-height: 1.55;
    opacity: 0.9;
}
.id-panel-cookie__policy-link {
    text-decoration: underline;
    opacity: 0.85;
}
.id-panel-cookie__policy-link:hover {
    opacity: 1;
}

.id-panel-cookie__actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* Кнопки */
.id-panel-cookie__btn {
    border: none;
    border-radius: 5px;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
    transition: filter 0.2s, transform 0.15s;
    white-space: nowrap;
}
.id-panel-cookie__btn:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}
.id-panel-cookie__btn:active {
    transform: translateY(0);
}

/* Панель настроек */
.id-panel-cookie__settings-panel {
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.15);
    margin-top: 14px;
}
.id-panel-cookie__settings-panel[hidden] { display: none; }

.id-panel-cookie__settings-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 14px;
}

/* Категории */
.id-panel-cookie__categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}
.id-panel-cookie__category {
    background: rgba(255,255,255,0.07);
    border-radius: 6px;
    padding: 12px 14px;
}
.id-panel-cookie__category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.id-panel-cookie__category-name {
    font-size: 13px;
    font-weight: 600;
    flex: 1;
}
.id-panel-cookie__category-desc {
    font-size: 12px;
    margin: 0;
    opacity: 0.75;
    line-height: 1.5;
}
.id-panel-cookie__always-on {
    font-size: 11px;
    background: rgba(255,255,255,0.15);
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Toggle switch */
.id-panel-cookie__toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}
.id-panel-cookie__toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.id-panel-cookie__toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.25);
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.25s;
}
.id-panel-cookie__toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 3px;
    transition: transform 0.25s;
}
.id-panel-cookie__toggle input:checked + .id-panel-cookie__toggle-slider {
    background: #27ae60;
}
.id-panel-cookie__toggle input:checked + .id-panel-cookie__toggle-slider::before {
    transform: translateX(18px);
}

.id-panel-cookie__settings-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Мобильная версия */
@media (max-width: 600px) {
    .id-panel-cookie__inner {
        padding: 14px 16px;
    }
    .id-panel-cookie__main {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .id-panel-cookie__actions {
        width: 100%;
    }
    .id-panel-cookie__btn {
        flex: 1;
        text-align: center;
    }
    .id-panel-cookie--bottom-left,
    .id-panel-cookie--bottom-right {
        left: 0;
        right: 0;
        max-width: 100%;
        border-radius: 0;
    }
    .id-panel-cookie__settings-actions {
        flex-direction: column;
    }
    .id-panel-cookie__settings-actions .id-panel-cookie__btn {
        width: 100%;
    }
}

.id-panel-modal-tabs {
    display: flex;
    gap: 0;
    margin: -30px -30px 24px;
    padding: 0 30px;
    border-bottom: 2px solid #ecf0f1;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.id-panel-modal-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 14px 22px;
    font-size: 15px;
    font-weight: 500;
    color: #7f8c8d;
    cursor: pointer;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.id-panel-modal-tab:hover {
    color: #2c3e50;
}

.id-panel-modal-tab--active {
    color: #2c3e50;
    border-bottom-color: #3498db;
    background: #fff;
}

.id-panel-modal-tab-content {
    display: none;
}

.id-panel-modal-tab-content--active {
    display: block;
}

/* Содержимое вкладки «О Курсе» */
.id-panel-about-course {
    line-height: 1.7;
    color: #2c3e50;
    font-size: 15px;
}

.id-panel-about-course h1,
.id-panel-about-course h2,
.id-panel-about-course h3,
.id-panel-about-course h4 {
    margin: 1.2em 0 0.5em;
    color: #2c3e50;
    line-height: 1.35;
}

.id-panel-about-course h1 { font-size: 1.6em; }
.id-panel-about-course h2 { font-size: 1.35em; }
.id-panel-about-course h3 { font-size: 1.15em; }

.id-panel-about-course p { margin: 0 0 1em; }

.id-panel-about-course ul,
.id-panel-about-course ol {
    margin: 0 0 1em 1.5em;
    padding: 0;
}

.id-panel-about-course li { margin-bottom: 0.4em; }

.id-panel-about-course img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.id-panel-about-course a {
    color: #3498db;
    text-decoration: none;
}

.id-panel-about-course a:hover {
    text-decoration: underline;
}

.id-panel-about-course blockquote {
    border-left: 4px solid #3498db;
    margin: 1em 0;
    padding: 10px 16px;
    background: #f0f7ff;
    color: #555;
    border-radius: 0 4px 4px 0;
}

.id-panel-about-course table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
    font-size: 14px;
}

.id-panel-about-course table th,
.id-panel-about-course table td {
    border: 1px solid #dee2e6;
    padding: 8px 12px;
    text-align: left;
}

.id-panel-about-course table th {
    background: #f8f9fa;
    font-weight: 600;
}

