/* ===== 家庭日程日历样式 fh-schedule.css ===== */

/* Header */
.fh-sched-header { margin-bottom: 16px; }
.fh-sched-title-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.fh-sched-title { margin: 0; font-size: 20px; font-weight: 700; color: #2c3e50; }
.fh-sched-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fh-sched-btn { padding: 6px 14px; border: 1px solid #ddd; border-radius: 6px; background: white; cursor: pointer; font-size: 13px; color: #555; transition: all 0.2s; }
.fh-sched-btn:hover { background: #f5f5f5; border-color: #bbb; }
.fh-sched-today { font-weight: 600; color: #3498db; border-color: #3498db; }
.fh-sched-prev, .fh-sched-next { padding: 6px 12px; font-size: 16px; font-weight: bold; }
.fh-sched-add { background: #3498db !important; color: white !important; border-color: #3498db !important; font-weight: 600; }
.fh-sched-add:hover { background: #2980b9 !important; }
.fh-sched-date-label { font-size: 14px; font-weight: 600; color: #2c3e50; min-width: 100px; text-align: center; }

/* View tabs */
.fh-sched-view-tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.fh-sched-tab { padding: 6px 16px; border: 1px solid #ddd; border-radius: 6px; background: white; cursor: pointer; font-size: 13px; color: #666; transition: all 0.2s; }
.fh-sched-tab.active { background: #3498db; color: white; border-color: #3498db; }

/* Member filter */
.fh-sched-members { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.fh-sched-filter-label { font-size: 12px; color: #999; }
.fh-sched-member-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border: 1px solid #ddd; border-radius: 12px; background: white; cursor: pointer; font-size: 12px; color: #666; transition: all 0.2s; }
.fh-sched-member-chip.active { background: #f0f7ff; }
.fh-sched-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }

/* Month view */
.fh-sched-month { background: white; border-radius: 10px; overflow: hidden; border: 1px solid #eee; }
.fh-sched-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); background: #f8f9fa; border-bottom: 1px solid #eee; }
.fh-sched-weekday { padding: 8px; text-align: center; font-size: 12px; font-weight: 600; color: #888; }
.fh-sched-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.fh-sched-day { min-height: 90px; border-right: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; padding: 4px; cursor: pointer; transition: background 0.15s; }
.fh-sched-day:hover { background: #f8fbff; }
.fh-sched-day.other-month { background: #fafafa; }
.fh-sched-day.other-month .fh-sched-day-num { color: #ccc; }
.fh-sched-day.today { background: #fffde7; }
.fh-sched-day.today .fh-sched-day-num { background: #3498db; color: white; border-radius: 50%; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.fh-sched-day-num { font-size: 12px; color: #666; display: inline-block; margin-bottom: 2px; }
.fh-sched-day-events { display: flex; flex-direction: column; gap: 2px; }
.fh-sched-event-pill { display: flex; align-items: center; gap: 3px; padding: 2px 4px; border-radius: 3px; background: #f5f5f5; font-size: 10px; overflow: hidden; cursor: pointer; transition: background 0.15s; }
.fh-sched-event-pill:hover { background: #e8e8e8; }
.fh-sched-event-time { color: #999; font-size: 9px; white-space: nowrap; }
.fh-sched-event-title { color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fh-sched-more { font-size: 10px; color: #3498db; text-align: center; margin-top: 1px; }

/* Week view */
.fh-sched-week { background: white; border-radius: 10px; overflow: hidden; border: 1px solid #eee; }
.fh-sched-week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; }
.fh-sched-week-day { border-right: 1px solid #f0f0f0; min-height: 300px; display: flex; flex-direction: column; }
.fh-sched-week-day:last-child { border-right: none; }
.fh-sched-week-day.today .fh-sched-week-day-header { background: #fffde7; }
.fh-sched-week-day-header { padding: 6px 8px; background: #f8f9fa; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.fh-sched-week-day-name { font-size: 11px; color: #888; font-weight: 600; }
.fh-sched-week-day-date { font-size: 12px; color: #555; font-weight: 600; }
.fh-sched-week-day.today .fh-sched-week-day-date { color: #3498db; }
.fh-sched-week-day-body { flex: 1; padding: 4px; overflow-y: auto; cursor: pointer; }
.fh-sched-empty { text-align: center; color: #ccc; font-size: 11px; padding: 8px; }
.fh-sched-week-event { padding: 4px 6px; margin-bottom: 4px; border-radius: 4px; background: #f8f9fa; cursor: pointer; transition: background 0.15s; }
.fh-sched-week-event:hover { background: #eef2f7; }
.fh-sched-week-event-time { font-size: 10px; color: #999; }
.fh-sched-week-event-title { font-size: 12px; color: #333; font-weight: 500; }
.fh-sched-week-event-loc { font-size: 10px; color: #aaa; margin-top: 2px; }

/* Day view */
.fh-sched-day-view { background: white; border-radius: 10px; overflow: hidden; border: 1px solid #eee; }
.fh-sched-day-header { padding: 12px 16px; background: #f8f9fa; border-bottom: 1px solid #eee; }
.fh-sched-day-header.today { background: #fffde7; }
.fh-sched-day-header-date { font-size: 18px; font-weight: 700; color: #2c3e50; margin-right: 8px; }
.fh-sched-day-header-week { font-size: 13px; color: #888; }
.fh-sched-day-timeline { padding: 8px; }
.fh-sched-day-empty { text-align: center; padding: 40px 20px; color: #aaa; }
.fh-sched-timeline-all-day { padding: 8px 12px; margin-bottom: 4px; border-radius: 4px; background: #f3e5f5; cursor: pointer; }
.fh-sched-timeline-label { font-size: 11px; color: #9b59b6; font-weight: 600; margin-right: 8px; }
.fh-sched-timeline-title { font-size: 13px; color: #333; }
.fh-sched-timeline-row { display: flex; border-bottom: 1px solid #f8f8f8; min-height: 48px; }
.fh-sched-timeline-hour { width: 50px; font-size: 11px; color: #bbb; text-align: right; padding: 4px 8px 0 0; }
.fh-sched-timeline-content { flex: 1; padding: 2px 0; }
.fh-sched-timeline-event { padding: 6px 10px; margin-bottom: 4px; border-radius: 4px; background: #f8f9fa; cursor: pointer; transition: background 0.15s; }
.fh-sched-timeline-event:hover { background: #eef2f7; }
.fh-sched-timeline-event-time { font-size: 11px; color: #999; }
.fh-sched-timeline-event-title { font-size: 14px; color: #333; font-weight: 500; margin-top: 2px; }
.fh-sched-timeline-event-loc { font-size: 11px; color: #aaa; margin-top: 2px; }
.fh-sched-timeline-event-members { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; }
.fh-sched-timeline-member-tag { font-size: 10px; color: white; padding: 1px 6px; border-radius: 8px; }

/* List view */
.fh-sched-list-view { display: flex; flex-direction: column; gap: 16px; }
.fh-sched-list-section h3 { font-size: 14px; font-weight: 600; color: #2c3e50; margin: 0 0 8px; }
.fh-sched-list-section.past h3 { color: #aaa; }
.fh-sched-list-empty { text-align: center; color: #ccc; padding: 20px; font-size: 13px; }
.fh-sched-list-item { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; background: white; border-radius: 8px; margin-bottom: 6px; border: 1px solid #f0f0f0; cursor: pointer; transition: all 0.15s; }
.fh-sched-list-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.fh-sched-list-item.past { opacity: 0.5; }
.fh-sched-list-item-bar { width: 4px; min-height: 36px; border-radius: 2px; flex-shrink: 0; }
.fh-sched-list-item-body { flex: 1; }
.fh-sched-list-item-date { font-size: 11px; color: #999; margin-bottom: 2px; }
.fh-sched-list-item-title { font-size: 14px; color: #333; font-weight: 500; }
.fh-sched-list-item-loc { font-size: 11px; color: #aaa; margin-top: 2px; }
.fh-sched-list-badge { font-size: 10px; padding: 1px 6px; border-radius: 8px; margin-left: 4px; }
.fh-sched-list-badge.today { background: #e74c3c; color: white; }
.fh-sched-list-badge.tomorrow { background: #f39c12; color: white; }
.fh-sched-list-badge.soon { background: #e8f5e9; color: #2ecc71; }

/* Modal */
.fh-sched-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.fh-sched-modal { background: white; border-radius: 12px; max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 12px 40px rgba(0,0,0,0.15); }
.fh-sched-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #eee; }
.fh-sched-modal-header h3 { margin: 0; font-size: 17px; color: #2c3e50; }
.fh-sched-modal-close { background: none; border: none; font-size: 24px; color: #999; cursor: pointer; padding: 0; line-height: 1; }
.fh-sched-modal-close:hover { color: #333; }
.fh-sched-modal-body { padding: 16px 20px; }
.fh-sched-modal-footer { padding: 12px 20px; border-top: 1px solid #eee; display: flex; justify-content: flex-end; gap: 8px; }

/* Form */
.fh-sched-templates { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.fh-sched-template-btn { padding: 4px 10px; border: 1px solid #3498db; border-radius: 12px; background: #f0f7ff; color: #3498db; font-size: 12px; cursor: pointer; transition: all 0.15s; }
.fh-sched-template-btn:hover { background: #3498db; color: white; }
.fh-sched-form-group { margin-bottom: 12px; }
.fh-sched-form-group label { display: block; font-size: 12px; font-weight: 600; color: #666; margin-bottom: 4px; }
.fh-sched-form-group input, .fh-sched-form-group select, .fh-sched-form-group textarea { width: 100%; padding: 8px 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; box-sizing: border-box; }
.fh-sched-form-group input:focus, .fh-sched-form-group select:focus, .fh-sched-form-group textarea:focus { outline: none; border-color: #3498db; }
.fh-sched-form-row { display: flex; gap: 8px; }
.fh-sched-form-row .fh-sched-form-group { flex: 1; }
.fh-sched-checkboxes { display: flex; flex-wrap: wrap; gap: 8px; }
.fh-sched-check { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; cursor: pointer; color: #555; }
.fh-sched-check input { width: auto; }

/* Detail modal */
.fh-sched-detail-modal { max-width: 400px; }
.fh-sched-detail-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f8f8f8; }
.fh-sched-detail-label { font-size: 18px; width: 24px; text-align: center; }
.fh-sched-detail-member { display: inline-block; font-size: 11px; color: white; padding: 2px 8px; border-radius: 10px; margin-right: 4px; }

/* Buttons */
.fh-sched-btn-primary { padding: 8px 20px; background: #3498db !important; color: white !important; border: none !important; border-radius: 6px !important; font-size: 14px; font-weight: 600; cursor: pointer; }
.fh-sched-btn-primary:hover { background: #2980b9 !important; }
.fh-sched-btn-cancel { padding: 8px 20px; background: #f0f0f0 !important; color: #666 !important; border: none !important; border-radius: 6px !important; font-size: 14px; cursor: pointer; }
.fh-sched-btn-cancel:hover { background: #e0e0e0 !important; }
.fh-sched-btn-danger { padding: 8px 20px; background: white !important; color: #e74c3c !important; border: 1px solid #e74c3c !important; border-radius: 6px !important; font-size: 14px; cursor: pointer; }
.fh-sched-btn-danger:hover { background: #e74c3c !important; color: white !important; }

/* Toast */
.fh-sched-toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px); background: #333; color: white; padding: 10px 24px; border-radius: 8px; font-size: 14px; z-index: 999999; transition: transform 0.3s; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.fh-sched-toast.show { transform: translateX(-50%) translateY(0); }
.fh-sched-toast.error { background: #e74c3c; }

/* Mobile responsive */
@media (max-width: 768px) {
    .fh-sched-day { min-height: 60px; }
    .fh-sched-event-title { font-size: 9px; }
    .fh-sched-week-day { min-height: 200px; }
    .fh-sched-form-row { flex-direction: column; }
    .fh-sched-actions { gap: 4px; }
    .fh-sched-btn { padding: 4px 10px; font-size: 12px; }
    .fh-sched-date-label { min-width: 80px; font-size: 12px; }
    .fh-sched-timeline-hour { width: 40px; font-size: 10px; }
}


/* Member filter dropdown */
.fh-sched-member-select {
  padding: 4px 10px;
  border: 1px solid var(--h-border, #ddd);
  border-radius: 8px;
  background: var(--h-card, #fff);
  color: var(--h-text, #333);
  font-size: 13px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23999' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 26px;
  max-width: 120px;
}
.fh-sched-member-select:hover {
  border-color: var(--h-accent, #6366f1);
}
.fh-sched-member-select:focus {
  border-color: var(--h-accent, #6366f1);
}
[data-theme="dark"] .fh-sched-member-select {
  background-color: var(--h-card, #1e293b);
  color: var(--h-text, #e2e8f0);
  border-color: var(--h-border, #334155);
}
[data-theme="dark"] .fh-sched-member-select option {
  background: #1e293b;
  color: #e2e8f0;
}
