/* タスクビュー切り替えボタンのスタイル */
.view-toggle-controls {
  display: flex;
  margin-bottom: 15px;
  gap: 10px;
}

.view-toggle-btn {
  padding: 8px 15px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--light-gray);
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  text-align: center;
  font-weight: normal;
}

.view-toggle-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  font-weight: bold;
}

.view-toggle-btn:hover:not(.active) {
  background-color: #e0e0e0;
}

/* EisenhowerMatrixのスタイル */
.eisenhower-matrix {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  grid-template-rows: auto 1fr 1fr;
  gap: 15px;
  margin-top: 20px;
}

.matrix-header-row {
  display: contents;
}

.matrix-header-col {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  padding: 10px;
  background-color: var(--light-gray);
  border-radius: 4px;
}

.matrix-header-row.important {
  grid-row: 2;
  grid-column: 1;
}

.matrix-header-row.important::before {
  content: "重要";
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  color: var(--priority-high);
  background-color: rgba(231, 76, 60, 0.1);
  font-weight: bold;
  padding: 10px;
  border-radius: 4px;
  height: 100%;
}

.matrix-header-row.not-important {
  grid-row: 3;
  grid-column: 1;
}

.matrix-header-row.not-important::before {
  content: "重要でない";
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  color: var(--priority-low);
  background-color: rgba(106, 168, 79, 0.1);
  font-weight: bold;
  padding: 10px;
  border-radius: 4px;
  height: 100%;
}

.matrix-header-col.urgent {
  grid-row: 1;
  grid-column: 2;
  color: var(--priority-high);
  background-color: rgba(231, 76, 60, 0.1);
}

.matrix-header-col.not-urgent {
  grid-row: 1;
  grid-column: 3;
  color: var(--primary-color);
  background-color: rgba(74, 134, 232, 0.1);
}

.matrix-corner {
  grid-row: 1;
  grid-column: 1;
}

.matrix-quadrant {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  background-color: var(--card-background);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
}

#quadrant-important-urgent {
  grid-row: 2;
  grid-column: 2;
  border-left: 4px solid var(--priority-high);
}

#quadrant-important-not-urgent {
  grid-row: 2;
  grid-column: 3;
  border-left: 4px solid var(--primary-color);
}

#quadrant-not-important-urgent {
  grid-row: 3;
  grid-column: 2;
  border-left: 4px solid var(--priority-medium);
}

#quadrant-not-important-not-urgent {
  grid-row: 3;
  grid-column: 3;
  border-left: 4px solid var(--priority-low);
}

.quadrant-header {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.quadrant-header h3 {
  font-size: 1rem;
  margin: 0 0 5px 0;
}

.quadrant-info {
  font-size: 0.85rem;
  color: var(--light-text-color);
}

.quadrant-tasks {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quadrant-empty {
  padding: 20px;
  text-align: center;
  color: var(--light-text-color);
  font-style: italic;
}

.matrix-task {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 10px;
  background-color: var(--card-background);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.matrix-task:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.matrix-task.completed {
  opacity: 0.7;
  text-decoration: line-through;
}

.matrix-task-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.matrix-task-title {
  font-weight: bold;
  word-break: break-word;
  flex: 1;
}

.matrix-task-actions {
  display: flex;
  gap: 5px;
}

.matrix-task-actions button {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  padding: 2px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.matrix-task-actions button:hover {
  opacity: 1;
}

.matrix-task-description {
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-color);
}

.matrix-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--light-text-color);
}

.matrix-task-priority {
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: bold;
}

.matrix-task-priority.priority-high {
  background-color: rgba(231, 76, 60, 0.15);
  color: var(--priority-high);
}

.matrix-task-priority.priority-medium {
  background-color: rgba(243, 156, 18, 0.15);
  color: var(--priority-medium);
}

.matrix-task-priority.priority-low {
  background-color: rgba(106, 168, 79, 0.15);
  color: var(--priority-low);
}

.matrix-task-due-date .overdue {
  color: var(--overdue);
  font-weight: bold;
}

.matrix-task-due-date .due-today {
  color: var(--due-today);
  font-weight: bold;
}

.matrix-task-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.matrix-task-tag {
  background-color: var(--tag-background);
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 0.75rem;
}

.matrix-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.matrix-empty-message {
  text-align: center;
  padding: 40px;
  color: var(--light-text-color);
  font-style: italic;
}

@media (max-width: 768px) {
  .eisenhower-matrix {
    grid-gap: 10px;
  }
  
  .matrix-quadrant {
    padding: 10px;
    min-height: 150px;
  }
  
  .quadrant-header h3 {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .eisenhower-matrix {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  
  .matrix-header-row, 
  .matrix-header-col,
  .matrix-corner {
    display: none;
  }
  
  .matrix-quadrant {
    margin-bottom: 15px;
  }
}