/* ============================================
   NOTIFICATION SYSTEM — PREMIUM DARK THEME
   Feature: notification-reminder-system (Task 11)
   ============================================ */

/* ─── Reminder Preview в форме задач ─────────── */

.reminder-preview {
    margin-top: 12px;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.reminder-preview-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #a5b4fc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.reminder-preview-title i {
    font-size: 1rem;
}

.reminder-preview-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.reminder-preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    font-size: 0.82rem;
    color: #ccc;
    transition: all 0.2s;
}

.reminder-preview-item:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}

.reminder-preview-item .rp-label {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.reminder-preview-item .rp-label i {
    color: #818cf8;
    font-size: 0.9rem;
}

.reminder-preview-item .rp-time {
    font-size: 0.78rem;
    color: #888;
    white-space: nowrap;
}

.reminder-preview-empty {
    text-align: center;
    padding: 12px;
    color: #555;
    font-size: 0.82rem;
    font-style: italic;
}

.reminder-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.1);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.15);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.reminder-add-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #fff;
}

/* Custom reminder input row */
.reminder-custom-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
}

.reminder-custom-row input[type="datetime-local"] {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(99, 102, 241, 0.15);
    color: #fff;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.82rem;
}

.reminder-custom-row input[type="datetime-local"]:focus {
    border-color: #6366f1;
    outline: none;
}

.reminder-custom-row .rc-save {
    padding: 6px 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.reminder-custom-row .rc-cancel {
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #888;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.78rem;
    cursor: pointer;
}

/* ─── Notification Settings Page ─────────────── */

.notif-settings {
    max-width: 800px;
    margin: 0 auto;
}

.notif-section {
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.95), rgba(22, 22, 42, 0.95));
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
}

.notif-section-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notif-section-title i {
    color: #818cf8;
}

/* Channel toggle */
.channel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.channel-row:hover {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(99, 102, 241, 0.15);
}

.channel-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.channel-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.channel-icon.telegram { background: rgba(0, 136, 204, 0.15); color: #29b6f6; }
.channel-icon.email { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.channel-icon.browser { background: rgba(139, 92, 246, 0.15); color: #c4b5fd; }
.channel-icon.push { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.channel-icon.inapp { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; }

.channel-name {
    font-weight: 700;
    color: #fff;
    font-size: 0.92rem;
}

.channel-detail {
    font-size: 0.78rem;
    color: #666;
    margin-top: 2px;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 26px;
    transition: 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #666;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
    background: #fff;
}

/* Telegram link section */
.telegram-link-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(0, 136, 204, 0.06);
    border: 1px solid rgba(0, 136, 204, 0.15);
    border-radius: 14px;
    margin-top: 12px;
}

.telegram-link-section.linked {
    border-color: rgba(16, 185, 129, 0.2);
    background: rgba(16, 185, 129, 0.06);
}

.tg-link-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(99, 102, 241, 0.15);
    color: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-family: monospace;
    letter-spacing: 2px;
    text-align: center;
    max-width: 160px;
}

.tg-link-input::placeholder {
    letter-spacing: 0;
    color: #555;
}

.tg-link-btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.tg-link-btn.link {
    background: linear-gradient(135deg, #0088cc, #29b6f6);
    color: #fff;
}

.tg-link-btn.unlink {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Granular type settings */
.type-settings-grid {
    display: grid;
    gap: 8px;
}

.type-setting-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.type-setting-label {
    flex: 1;
    min-width: 0;
}

.type-setting-name {
    font-weight: 600;
    color: #ddd;
    font-size: 0.85rem;
}

.type-setting-desc {
    font-size: 0.72rem;
    color: #555;
}

.type-setting-channels {
    display: flex;
    gap: 4px;
}

.type-channel-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
}

.type-channel-btn.active {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.3);
}

.type-channel-btn:hover {
    border-color: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}

/* Test notification button */
.test-notif-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.2);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s;
}

.test-notif-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #fff;
    transform: translateY(-1px);
}

/* ─── Notification dropdown enhancements ─────── */

.notif-item-priority {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 3px 0 0 3px;
}

.notif-item-priority.urgent { background: #ef4444; }
.notif-item-priority.high { background: #f59e0b; }
.notif-item-priority.medium { background: #6366f1; }
.notif-item-priority.low { background: #6b7280; }

/* ─── Task card reminder badge ───────────────── */

.tc-reminders-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.1);
    color: #a5b4fc;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tc-reminders-badge:hover {
    background: rgba(99, 102, 241, 0.2);
}

.tc-reminders-badge i {
    font-size: 0.8rem;
}

/* ─── Mobile ─────────────────────────────────── */

@media (max-width: 768px) {
    .notif-section { padding: 16px; border-radius: 16px; }
    .channel-row { padding: 12px; }
    .type-setting-row { flex-wrap: wrap; }
    .type-setting-channels { width: 100%; justify-content: flex-end; }
    .reminder-preview { padding: 12px; }
    .telegram-link-section { flex-wrap: wrap; }
    .tg-link-input { max-width: 100%; }
}
