/* v17.0 Schedule Modal */
.schedule-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.schedule-modal {
    background: var(--brand-bg-primary, #1a1a2e);
    border: 1px solid var(--brand-border, #333);
    border-radius: 12px;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.schedule-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--brand-border, #333);
}

.schedule-modal-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--brand-text-primary, #eee);
}

.schedule-modal-close {
    background: none;
    border: none;
    color: var(--brand-text-secondary, #888);
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
}

.schedule-modal-close:hover {
    color: var(--brand-text-primary, #eee);
}

.schedule-modal-body {
    padding: 20px;
}

.schedule-presets {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.schedule-preset-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--brand-border, #333);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
    color: var(--brand-text-primary, #eee);
    font-size: 14px;
}

.schedule-preset-item:hover {
    border-color: var(--brand-accent, #6366f1);
}

.schedule-preset-item input[type="radio"] {
    accent-color: var(--brand-accent, #6366f1);
}

.schedule-custom-section input[type="number"],
.schedule-custom-section select {
    background: var(--brand-bg-secondary, #16213e);
    border: 1px solid var(--brand-border, #333);
    border-radius: 6px;
    color: var(--brand-text-primary, #eee);
    padding: 6px 8px;
    font-size: 14px;
}

.schedule-custom-section label {
    color: var(--brand-text-secondary, #888);
    font-size: 13px;
}

.schedule-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--brand-border, #333);
}

.schedule-save-btn {
    background: var(--brand-accent, #6366f1);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.schedule-save-btn:hover {
    opacity: 0.9;
}

.schedule-delete-btn {
    background: none;
    color: #ef4444;
    border: 1px solid #ef4444;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    margin-right: auto;
}

.schedule-delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* 排程使用量提示 */
.schedule-usage-info {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.5;
}
.schedule-usage-info.has-remaining {
    background: rgba(74, 144, 217, 0.1);
    color: var(--brand-primary, #4a90d9);
    border: 1px solid rgba(74, 144, 217, 0.2);
}
.schedule-usage-info.at-limit {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* 取代排程勾選區 */
.schedule-replace-section {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.schedule-replace-hint {
    font-size: 13px;
    color: #f59e0b;
    margin-bottom: 4px;
}
.schedule-replace-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--brand-border, #333);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-size: 14px;
    color: var(--brand-text-primary, #eee);
}
.schedule-replace-item:hover {
    border-color: #f59e0b;
}
.schedule-replace-item.checked {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}
.schedule-replace-item.checked .schedule-replace-name {
    text-decoration: line-through;
    opacity: 0.6;
}
.schedule-replace-item input[type="checkbox"] {
    accent-color: #f59e0b;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.schedule-replace-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.schedule-replace-type {
    font-size: 12px;
    color: var(--brand-text-secondary, #888);
    flex-shrink: 0;
}

/* Notification badge */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* Sidebar footer btn needs relative for badge positioning */
#notificationBtnSidebar {
    position: relative;
}

/* Notification diff in notification center */
.notification-diff {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
