/* ============================================================
   OPUM LEGAL — редизайн v2.1
   Юридические документы: модалка, табы, чекбоксы, кнопки
   Плавающий бейдж — в едином чёрно-зелёном стиле.
   ============================================================ */

:root {
    --opum-legal-em:      #4ade80;
    --opum-legal-em-dark: #2a9d4a;
    --opum-legal-em-bg:   rgba(42, 157, 74, 0.15);
    --opum-legal-em-line: rgba(74, 222, 128, 0.55);
    --opum-legal-onyx-1:  #131313;
    --opum-legal-onyx-2:  #0a0a0a;
}

/* ---------- Плавающий бейдж (чёрный + зелёный) ---------- */
.opum-legal-floating {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 851;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(180deg, var(--opum-legal-onyx-1) 0%, var(--opum-legal-onyx-2) 100%);
    color: var(--opum-legal-em);
    border: 1.5px solid var(--opum-legal-em-line);
    border-radius: 60px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: all 0.28s cubic-bezier(0.34, 1.4, 0.4, 1);
}
.opum-legal-floating__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(74, 222, 128, 0.12);
    font-size: 14px;
    line-height: 1;
    transition: all 0.25s ease;
}
.opum-legal-floating__label {
    color: inherit;
    line-height: 1;
}
.opum-legal-floating__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: linear-gradient(135deg, #ff5555 0%, #dc2626 100%);
    color: #fff;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 0 12px rgba(220, 38, 38, 0.55);
    animation: opumBadgePulse 1.5s infinite;
}
.opum-legal-floating:hover {
    transform: translateY(-3px);
    background: linear-gradient(180deg, #35ffa1 0%, var(--opum-legal-em-dark) 100%);
    color: #001a0d;
    border-color: #35ffa1;
    box-shadow:
        0 16px 36px rgba(42, 157, 74, 0.6),
        0 0 28px rgba(42, 157, 74, 0.4);
}
.opum-legal-floating:hover .opum-legal-floating__icon {
    background: rgba(0, 26, 13, 0.22);
}
.opum-legal-floating.is-ok {
    background: linear-gradient(180deg, #0a1f12 0%, #081610 100%);
    border-color: var(--opum-legal-em);
    color: var(--opum-legal-em);
}
.opum-legal-floating.is-ok .opum-legal-floating__icon {
    background: linear-gradient(180deg, #35ffa1 0%, #00c853 100%);
    color: #001a0d;
}

@keyframes opumBadgePulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.12); }
}

/* ============================================================
   МОДАЛКА
   ============================================================ */
.opum-legal-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    animation: opumModalFade 0.22s ease forwards;
}
@keyframes opumModalFade { to { opacity: 1; } }

.opum-legal-modal__dialog {
    background: #0f0f0f;
    border: 1px solid rgba(42, 157, 74, 0.35);
    border-radius: 24px;
    width: 100%;
    max-width: 880px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #e5e5e5;
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.75),
        0 0 80px rgba(42, 157, 74, 0.15);
    transform: translateY(24px);
    animation: opumModalSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes opumModalSlide { to { transform: translateY(0); } }

.opum-legal-modal__head {
    padding: 22px 26px;
    border-bottom: 1px solid #1f1f1f;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background:
        radial-gradient(ellipse 400px 100px at 0% 0%, rgba(42,157,74,0.15), transparent 70%),
        linear-gradient(180deg, #131313 0%, #0d0d0d 100%);
    position: relative;
}
.opum-legal-modal__head::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(74,222,128,0.35), transparent);
}
.opum-legal-modal__head h2 {
    margin: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.4px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.opum-legal-modal__head h2::before {
    content: '⚖';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(42,157,74,0.25) 0%, rgba(42,157,74,0.06) 100%);
    border: 1px solid rgba(74,222,128,0.45);
    color: #4ade80;
    font-size: 16px;
    box-shadow: 0 0 18px rgba(42,157,74,0.35);
}
.opum-legal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
    transition: all 0.25s cubic-bezier(0.34, 1.4, 0.4, 1);
}
.opum-legal-close:hover {
    background: #dc2626;
    border-color: #dc2626;
    transform: rotate(90deg) scale(1.05);
    box-shadow: 0 0 22px rgba(220,38,38,0.55);
}

.opum-legal-tabs {
    display: flex;
    gap: 8px;
    padding: 16px 22px 0;
    overflow-x: auto;
    background: #0f0f0f;
    scrollbar-width: none;
    position: relative;
}
.opum-legal-tabs::-webkit-scrollbar { display: none; }

.opum-legal-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.03);
    color: #b8b8b8;
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 60px;
    font-family: inherit;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.1px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.22s ease;
}
.opum-legal-tab__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(74,222,128,0.12);
    font-size: 12px;
    line-height: 1;
    transition: all 0.22s ease;
}
.opum-legal-tab__label { line-height: 1; }
.opum-legal-tab:hover:not(.is-active) {
    background: rgba(42,157,74,0.10);
    color: #4ade80;
    border-color: rgba(74,222,128,0.4);
    transform: translateY(-1px);
}
.opum-legal-tab.is-active {
    background: linear-gradient(180deg, #35ffa1 0%, #2a9d4a 100%);
    color: #001a0d;
    border-color: #4ade80;
    box-shadow: 0 8px 22px rgba(42,157,74,0.45), inset 0 1px 0 rgba(255,255,255,0.35);
    transform: translateY(-1px);
}
.opum-legal-tab.is-active .opum-legal-tab__icon {
    background: rgba(0, 26, 13, 0.2);
    color: #001a0d;
}
.opum-legal-tab__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #4ade80;
    color: #0b0b0b;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}
.opum-legal-tab.is-active .opum-legal-tab__check {
    background: #001a0d;
    color: #4ade80;
}

.opum-legal-content {
    flex: 1;
    overflow-y: auto;
    padding: 26px 28px;
    background: #0a0a0a;
    line-height: 1.75;
    font-size: 14.5px;
    max-height: 55vh;
    scrollbar-width: thin;
    scrollbar-color: rgba(74,222,128,0.4) #0a0a0a;
}
.opum-legal-content::-webkit-scrollbar { width: 6px; }
.opum-legal-content::-webkit-scrollbar-track { background: #0a0a0a; }
.opum-legal-content::-webkit-scrollbar-thumb {
    background: rgba(74,222,128,0.35);
    border-radius: 6px;
}
.opum-legal-content::-webkit-scrollbar-thumb:hover { background: rgba(74,222,128,0.65); }

.opum-legal-document h3 {
    color: #4ade80;
    margin: 0 0 18px;
    font-size: 19px;
    font-weight: 900;
    letter-spacing: -0.3px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(74,222,128,0.2);
    display: flex;
    align-items: center;
    gap: 12px;
}
.opum-legal-document__text {
    color: #d0d0d0;
    font-size: 14.5px;
    line-height: 1.75;
}
.opum-legal-document__text h2,
.opum-legal-document__text h3 { color: #4ade80; font-weight: 800; }
.opum-legal-document__text a { color: #4ade80; text-decoration: underline; }
.opum-legal-document__text p { margin: 0 0 12px; }

.opum-legal-document__text p[style*="ff6b6b"],
.opum-legal-document__text p[style*="#ff6b6b"] {
    background: linear-gradient(135deg, rgba(245,179,66,0.10) 0%, rgba(245,179,66,0.03) 100%) !important;
    border: 1px solid rgba(245,179,66,0.4) !important;
    border-left: 4px solid #f5b342 !important;
    border-radius: 12px !important;
    padding: 16px 20px !important;
    color: #ffd67a !important;
    font-size: 13.5px !important;
    line-height: 1.6 !important;
}
.opum-legal-document__text p[style*="ff6b6b"] code,
.opum-legal-document__text p[style*="#ff6b6b"] code {
    background: rgba(0,0,0,0.5);
    padding: 2px 8px;
    border-radius: 4px;
    color: #4ade80;
    font-size: 12.5px;
}

.opum-medical-signature {
    margin-top: 24px;
    padding: 22px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(42,157,74,0.06) 0%, rgba(42,157,74,0.01) 100%);
    border: 1px dashed rgba(74,222,128,0.35);
}
.opum-medical-signature__hint {
    color: #4ade80;
    font-size: 13.5px;
    font-weight: 800;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.opum-medical-signature__hint::before {
    content: '✍️';
    font-size: 16px;
}
.opum-medical-signed {
    padding: 18px 22px;
    background: linear-gradient(135deg, rgba(42,157,74,0.15) 0%, rgba(42,157,74,0.04) 100%);
    border: 1px solid rgba(74,222,128,0.45);
    border-radius: 14px;
    color: #4ade80;
    font-weight: 800;
    text-align: center;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 0 24px rgba(42,157,74,0.15);
}
.opum-medical-signed::before {
    content: '✅';
    font-size: 20px;
}
.opum-medical-clear,
.opum-medical-sign-btn {
    padding: 11px 22px;
    border-radius: 60px;
    font-family: inherit;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.22s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.opum-medical-clear {
    background: transparent;
    color: #4ade80;
    border: 1.5px solid rgba(74,222,128,0.55);
}
.opum-medical-clear:hover {
    background: rgba(42,157,74,0.15);
    transform: translateY(-1px);
}
.opum-medical-sign-btn {
    background: linear-gradient(180deg, #35ffa1 0%, #2a9d4a 100%);
    color: #001a0d;
    border: none;
    box-shadow: 0 6px 18px rgba(42,157,74,0.45);
}
.opum-medical-sign-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(42,157,74,0.6);
}
.opum-medical-sign-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.opum-legal-modal__footer {
    padding: 20px 24px 22px;
    border-top: 1px solid #1f1f1f;
    background: linear-gradient(180deg, #0d0d0d 0%, #131313 100%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
}
.opum-legal-modal__footer::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(74,222,128,0.25), transparent);
}

.opum-legal-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.opum-legal-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    font-weight: 600;
    color: #d0d0d0;
    cursor: pointer;
    padding: 12px 16px;
    background: #0a0a0a;
    border: 1.5px solid #1f1f1f;
    border-radius: 12px;
    transition: all 0.22s ease;
    line-height: 1.4;
}
.opum-legal-checkbox-label:hover {
    border-color: rgba(74,222,128,0.35);
    background: #0f0f0f;
    transform: translateX(2px);
}
.opum-legal-checkbox-label:has(input:checked) {
    border-color: rgba(74,222,128,0.55);
    background: linear-gradient(135deg, rgba(42,157,74,0.10) 0%, rgba(42,157,74,0.02) 100%);
    color: #ffffff;
}
.opum-legal-checkbox-label span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}
.opum-legal-checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: #0a0a0a;
    border: 1.5px solid #2a2a2a;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.opum-legal-checkbox-label input[type="checkbox"]:hover {
    border-color: rgba(74,222,128,0.55);
    box-shadow: 0 0 0 3px rgba(42,157,74,0.12);
}
.opum-legal-checkbox-label input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #35ffa1 0%, #2a9d4a 100%);
    border-color: #35ffa1;
    box-shadow: 0 0 0 3px rgba(42,157,74,0.18), 0 4px 12px rgba(42,157,74,0.4);
}
.opum-legal-checkbox-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid #001a0d;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.opum-legal-confirm {
    width: 100%;
    padding: 16px;
    background: linear-gradient(180deg, #35ffa1 0%, #00e676 55%, #00c853 100%);
    color: #001a0d;
    border: none;
    border-radius: 60px;
    font-family: inherit;
    font-weight: 900;
    font-size: 15px;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.4, 0.4, 1);
    box-shadow:
        0 10px 28px rgba(42,157,74,0.45),
        inset 0 2px 0 rgba(255,255,255,0.35),
        inset 0 -2px 0 rgba(0,80,30,0.2);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.opum-legal-confirm::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: rgba(0, 26, 13, 0.18);
    border-radius: 50%;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}
.opum-legal-confirm::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 60%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,0.55), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}
.opum-legal-confirm:hover {
    transform: translateY(-3px);
    box-shadow:
        0 16px 40px rgba(42,157,74,0.6),
        inset 0 2px 0 rgba(255,255,255,0.5),
        inset 0 -2px 0 rgba(0,80,30,0.2);
}
.opum-legal-confirm:hover::after { left: 120%; }
.opum-legal-confirm:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    filter: grayscale(0.3);
}

.opum-legal-message {
    display: none;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    animation: opumMessageIn 0.3s ease;
}
@keyframes opumMessageIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.opum-legal-message.is-success {
    display: block;
    background: linear-gradient(135deg, rgba(42,157,74,0.15) 0%, rgba(42,157,74,0.04) 100%);
    border: 1px solid rgba(74,222,128,0.45);
    color: #4ade80;
}
.opum-legal-message.is-error {
    display: block;
    background: linear-gradient(135deg, rgba(220,38,38,0.12) 0%, rgba(220,38,38,0.03) 100%);
    border: 1px solid rgba(220,38,38,0.45);
    color: #ff8a80;
}

/* ============================================================
   ЧЕК-ЛИСТ В ЛК
   ============================================================ */
.opum-legal-checklist {
    max-width: 720px;
    margin: 20px auto;
    background: linear-gradient(135deg, #131313 0%, #0a0a0a 100%);
    border-radius: 20px;
    border: 1px solid #1f1f1f;
    padding: 26px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.opum-legal-checklist__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid #1f1f1f;
}
.opum-legal-checklist__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(42,157,74,0.2), rgba(42,157,74,0.05));
    border: 1px solid rgba(74,222,128,0.45);
    color: #4ade80;
    display: grid;
    place-items: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(42,157,74,0.2);
}
.opum-legal-checklist__meta h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.3px;
}
.opum-legal-checklist__meta p {
    margin: 5px 0 0;
    font-size: 13px;
    font-weight: 700;
}
.opum-legal-checklist__meta p.is-ok      { color: #4ade80; }
.opum-legal-checklist__meta p.is-pending { color: #f5b342; }

.opum-legal-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}
.opum-legal-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #0a0a0a;
    border: 1.5px solid #1f1f1f;
    border-radius: 14px;
    transition: all 0.22s ease;
}
.opum-legal-item:hover {
    border-color: rgba(74,222,128,0.35);
    transform: translateX(3px);
}
.opum-legal-item.is-agreed {
    border-color: rgba(74,222,128,0.4);
    background: linear-gradient(135deg, rgba(42,157,74,0.06) 0%, rgba(42,157,74,0.01) 100%);
}
.opum-legal-item--medical { border-style: dashed; }
.opum-legal-item__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(74,222,128,0.10);
    border: 1px solid rgba(74,222,128,0.30);
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.opum-legal-item__body {
    flex: 1;
    min-width: 0;
}
.opum-legal-item__title {
    font-weight: 800;
    color: #fff;
    font-size: 14.5px;
    margin-bottom: 3px;
    line-height: 1.3;
}
.opum-legal-item__status {
    font-size: 12.5px;
    font-weight: 700;
}
.opum-legal-item__status.is-ok      { color: #4ade80; }
.opum-legal-item__status.is-pending { color: #808080; }

.opum-legal-read {
    padding: 9px 18px;
    background: transparent;
    color: #4ade80;
    border: 1.5px solid rgba(74,222,128,0.55);
    border-radius: 60px;
    font-family: inherit;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.22s ease;
    white-space: nowrap;
}
.opum-legal-read:hover {
    background: linear-gradient(180deg, #35ffa1 0%, #2a9d4a 100%);
    color: #001a0d;
    border-color: #35ffa1;
    transform: scale(1.04);
    box-shadow: 0 6px 18px rgba(42,157,74,0.4);
}

.opum-legal-accept-all {
    width: 100%;
    padding: 15px;
    background: linear-gradient(180deg, #35ffa1 0%, #00e676 55%, #00c853 100%);
    color: #001a0d;
    border: none;
    border-radius: 60px;
    font-family: inherit;
    font-weight: 900;
    font-size: 14.5px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 8px 24px rgba(42,157,74,0.4), inset 0 2px 0 rgba(255,255,255,0.3);
}
.opum-legal-accept-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(42,157,74,0.55), inset 0 2px 0 rgba(255,255,255,0.4);
}

.opum-legal-done {
    padding: 14px 18px;
    background: rgba(42,157,74,0.10);
    border: 1px solid rgba(74,222,128,0.45);
    border-radius: 12px;
    color: #4ade80;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

/* ============================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ
   Позиции согласованы с патчем в header.php темы.
   ============================================================ */
@media (max-width: 900px) {
    /* Legal-бейдж: только иконка, чуть больше на тач */
    .opum-legal-floating {
        padding: 8px 10px;
        gap: 6px;
    }
    .opum-legal-floating__label { display: none; }
    .opum-legal-floating__icon {
        width: 28px;
        height: 28px;
        font-size: 15px;
        background: rgba(74, 222, 128, 0.15);
    }
    .opum-legal-floating__badge {
        position: absolute;
        top: -4px;
        right: -4px;
        min-width: 18px;
        height: 18px;
        font-size: 10px;
        padding: 0 5px;
    }
}

@media (max-width: 640px) {
    .opum-legal-modal { padding: 0; align-items: flex-end; }
    .opum-legal-modal__dialog { max-height: 96vh; border-radius: 24px 24px 0 0; max-width: 100%; }
    .opum-legal-modal__head { padding: 16px 18px; }
    .opum-legal-modal__head h2 { font-size: 17px; gap: 10px; }
    .opum-legal-modal__head h2::before { width: 30px; height: 30px; font-size: 14px; border-radius: 9px; }
    .opum-legal-close { width: 36px; height: 36px; font-size: 14px; }
    .opum-legal-tabs { padding: 12px 14px 0; gap: 6px; }
    .opum-legal-tab { font-size: 12px; padding: 8px 12px; gap: 6px; }
    .opum-legal-tab__icon { width: 20px; height: 20px; font-size: 11px; }
    .opum-legal-content { padding: 18px 16px; font-size: 14px; max-height: 50vh; }
    .opum-legal-document h3 { font-size: 16px; padding-bottom: 12px; margin-bottom: 14px; }
    .opum-legal-modal__footer { padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px)); gap: 10px; }
    .opum-legal-checkbox-label { padding: 11px 14px; font-size: 13px; gap: 10px; border-radius: 11px; }
    .opum-legal-checkbox-label input[type="checkbox"] { width: 20px; height: 20px; }
    .opum-legal-checkbox-label input[type="checkbox"]:checked::after { left: 6px; top: 2px; width: 5px; height: 9px; }
    .opum-legal-confirm { padding: 14px; font-size: 14px; }
    .opum-medical-clear, .opum-medical-sign-btn { padding: 10px 18px; font-size: 12.5px; flex: 1; justify-content: center; }
}
/* ============================================================
   OPUM LEGAL — HOTFIX v2.2
   Табы в модалке сжимались flex-контейнером до нулевой высоты,
   когда контент длинный и диалог упирался в max-height: 92vh.
   Запрещаем ужимать header / tabs / footer. Контенту разрешаем
   скроллиться.
   ============================================================ */

/* 1. Ничего, кроме контента, не ужимается */
.opum-legal-modal__dialog > .opum-legal-modal__head,
.opum-legal-modal__dialog > .opum-legal-tabs,
.opum-legal-modal__dialog > .opum-legal-modal__footer {
    flex-shrink: 0 !important;
}

/* 2. Контент занимает всё оставшееся и сам скроллится */
.opum-legal-modal__dialog > .opum-legal-content {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

/* 3. Табам — гарантированная минимальная высота */
.opum-legal-tabs {
    min-height: 54px !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    padding: 14px 22px 10px !important;
}

.opum-legal-tab {
    min-height: 38px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    align-items: center !important;
}

/* 4. Контрастнее текст на НЕактивных табах
      (чтобы на тёмном фоне читались отчётливо) */
.opum-legal-tab:not(.is-active) {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #d0d0d0 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
}
.opum-legal-tab:not(.is-active):hover {
    background: rgba(42, 157, 74, 0.15) !important;
    color: #4ade80 !important;
    border-color: rgba(74, 222, 128, 0.55) !important;
}
.opum-legal-tab:not(.is-active) .opum-legal-tab__label {
    color: inherit !important;
}
.opum-legal-tab__icon {
    flex-shrink: 0 !important;
}

/* 5. Активный таб — аккуратнее, без съезжания */
.opum-legal-tab.is-active {
    flex-shrink: 0 !important;
}

/* 6. Мобильная версия — те же правила, только компактнее */
@media (max-width: 640px) {
    .opum-legal-tabs {
        min-height: 48px !important;
        padding: 12px 14px 8px !important;
    }
    .opum-legal-tab {
        min-height: 34px !important;
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
}