/* Обёртки и лейблы чекбоксов в настройках ЛК */
.notification-checkbox-wrapper {
    margin-bottom: 14px;
}

/* Отступы для блоков с чекбоксами в настройках ЛК */
.account-page #settingsForm .account-section {
    margin-bottom: 0;
}
.account-page #settingsForm:not(.settings-form-grid) .account-section {
    margin-bottom: 1.75rem;
}
.account-page #settingsForm .account-section .form-group {
    margin-bottom: 0.5rem;
}
.account-page #settingsForm .notification-checkbox-wrapper {
    margin-bottom: 6px;
    margin-top: 0;
}
.account-page #settingsForm.settings-form-grid .notification-checkbox-wrapper {
    margin-bottom: 0;
}
.account-page #settingsForm .account-section-title + .form-group {
    margin-top: 0.25rem;
}
.account-page #settingsForm label[for="hideOrganization"] {
    display: inline-flex;
    margin-top: 0.15rem;
}

.notification-checkbox {
    position: relative;
    padding-left: 36px;
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
}

.notification-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Квадратик чекбокса — аккуратный, с рамкой и тенью */
.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: #fff;
    border: 2px solid #c5d0de;
    border-radius: 6px;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.notification-checkbox:hover input:not(:disabled) ~ .checkmark {
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.12);
}

.notification-checkbox input:checked ~ .checkmark {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-color: var(--color-primary-light);
    box-shadow: 0 2px 6px rgba(42, 82, 152, 0.3);
}

/* Галочка */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.notification-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.notification-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
    box-sizing: border-box;
}

.checkbox-label {
    margin-left: 10px;
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.4;
}

/* Тёмная тема: чекбоксы в настройках ЛК */
html[data-theme="dark"] .notification-checkbox .checkmark {
    background-color: #1f2937;
    border: 2px solid #4b5563;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
html[data-theme="dark"] .notification-checkbox:hover input:not(:disabled) ~ .checkmark {
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.15);
}
html[data-theme="dark"] .notification-checkbox input:checked ~ .checkmark {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-color: var(--color-primary-light);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.35);
}
html[data-theme="dark"] .notification-checkbox .checkbox-label {
    color: var(--color-text);
}
html[data-theme="dark"] .notification-checkbox input:disabled ~ .checkmark {
    background-color: #111827 !important;
    border-color: #374151 !important;
    box-shadow: none !important;
}
html[data-theme="dark"] .notification-checkbox input:disabled:checked ~ .checkmark {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%) !important;
    border-color: #4b5563 !important;
}
html[data-theme="dark"] .disabled-notification .checkmark {
    background-color: #111827 !important;
    border-color: #374151 !important;
}
html[data-theme="dark"] .disabled-notification input:checked ~ .checkmark {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%) !important;
    border-color: #4b5563 !important;
}
html[data-theme="dark"] .disabled-notification .checkbox-label {
    color: #9ca3af;
}

/* Отключённый чекбокс («Скрывать организацию» и т.п.) — без фона, мягкий вид */
.disabled-checkbox {
    opacity: 0.92;
    position: relative;
}

.disabled-checkbox::before {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

.disabled-checkbox .checkmark {
    background-color: #eef1f5 !important;
    border-color: #d0d7e0 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

.disabled-checkbox input:checked ~ .checkmark {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%) !important;
    border-color: #6b7280 !important;
}

.disabled-checkbox:hover .checkmark {
    background-color: #eef1f5 !important;
}

.notification-checkbox input:disabled ~ .checkmark {
    background-color: #eef1f5 !important;
    border-color: #d0d7e0 !important;
    cursor: not-allowed;
    box-shadow: none !important;
}

.notification-checkbox input:disabled:checked ~ .checkmark {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%) !important;
    border-color: #6b7280 !important;
}

.notification-checkbox input:disabled ~ .checkbox-label {
    color: #6b7280;
    opacity: 0.85;
}

/* Недоступные уведомления (нет подтверждения контакта) — приглушённый стиль */
.disabled-notification {
    opacity: 0.85;
    cursor: not-allowed !important;
}

.disabled-notification .checkmark {
    background-color: #f1f3f5 !important;
    border-color: #dee2e6 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

.disabled-notification input:checked ~ .checkmark {
    background: linear-gradient(135deg, #adb5bd 0%, #868e96 100%) !important;
    border-color: #868e96 !important;
}

.disabled-notification .checkbox-label {
    color: #6c757d;
    font-style: italic;
}

/* Тёмная тема: блок «Скрывать организацию» — без фона, читаемый текст и чекбокс */
html[data-theme="dark"] .account-page .notification-checkbox.disabled-checkbox {
    opacity: 0.95;
}
html[data-theme="dark"] .account-page .notification-checkbox.disabled-checkbox .checkbox-label {
    color: var(--color-text);
}
html[data-theme="dark"] .account-page .notification-checkbox.disabled-checkbox .checkmark {
    background-color: #111827 !important;
    border: 2px solid #374151 !important;
}
html[data-theme="dark"] .account-page .notification-checkbox.disabled-checkbox input:checked ~ .checkmark {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%) !important;
    border-color: #4b5563 !important;
}