/* List Detail View */
#list-detail-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--accent-blue);
  gap: 10px;
  padding: 0 15px; /* Thêm padding cho header */
}

.sort-button {
  background: none;
  border: none;
  color: var(--accent-blue);
  font-size: 1.2rem;
  cursor: pointer;
}

#back-to-main-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 1.1rem;
  padding: 5px 0;
}

#list-title-header {
  font-weight: bold;
}

#reminders-container {
  padding: 0 15px;
  flex-grow: 1; /* Cho phép container lớn lên */
  overflow-y: auto; /* Thêm cuộn cho list */
}

.reminder-item {
  display: flex;
  align-items: flex-start;
  padding: 15px 0;
  border-bottom: 1px solid var(--secondary-bg);
  position: relative;
}

.reminder-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 10px;
  width: 100%;
}

.reminder-details .title {
  font-size: 1.1rem;
}

.reminder-details .notes {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.reminder-details .datetime {
  color: var(--accent-blue);
  font-size: 0.9rem;
}

.reminder-details .datetime:hover {
  cursor: pointer;
}

.due-date-it {
  color: var(--accent-blue) !important;
  font-weight: 600;
}

.due-date-other {
  color: var(--accent-green) !important;
  font-weight: 600;
}

.reminder-item.completed .title,
.reminder-item.completed .notes,
.reminder-item.completed .datetime {
  text-decoration: line-through;
  color: var(--text-secondary) !important;
}

.reminder-item.completed .reminder-priority label {
  opacity: 0.6;
  cursor: not-allowed;
}

.reminder-actions-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.action-btn {
  color: var(--accent-blue);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.action-btn:active {
  transform: scale(0.9);
}

.action-btn.btn-toggle-complete .fa-check-circle {
  color: var(--accent-green);
}

#detail-footer {
  padding: 15px;
}

.reminder-priority {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 6px;
}

.reminder-priority label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #222225;
  border: 1px solid #343437;
  border-radius: 999px;
  padding: 8px 14px;
  color: #d6d6db;
  font-weight: 600;
  transition: all 0.18s ease;
  min-height: 36px;
  cursor: pointer;
}

.reminder-priority label:active {
  transform: scale(0.98);
}

.reminder-priority input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.reminder-priority label:has(input[type="radio"]:focus-visible) {
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25);
}

.reminder-priority label:has(input[type="radio"]:checked) {
  background: #2a2a2e;
  border-color: #3f3f43;
  color: #ffffff;
}

.reminder-priority label:has(input[value="low"]:checked) {
  background: #1a2b1a;
  border-color: #244224;
  color: #9effc3;
}

.reminder-priority label:has(input[value="medium"]:checked) {
  background: #523205;
  border-color: #663e07;
  color: #ecab7a;
}

.reminder-priority label:has(input[value="high"]:checked) {
  background: #3b1a1a;
  border-color: #5a2828;
  color: #ff6b6b;
}

#new-item-btn i {
  color: var(--accent-orange);
  margin-right: 5px;
}

#new-item-btn {
  color: var(--accent-orange);
  font-weight: bold;
}

.empty-state {
  text-align: center;
  padding: 40px 12px;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.empty-text {
  font-weight: 700;
  margin-bottom: 4px;
}

.empty-sub {
  font-size: 14px;
}

.result-group {
  padding: 0px 12px 20px 12px;
}

.group-title {
  color: var(--accent-orange);
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 14px 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.group-count {
  background: var(--accent-orange);
  color: var(--text-primary);
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 11px;
}
