@import url("root.css");

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

#app {
  height: 100%;
  display: flex;
  flex-direction: column;
}

header {
  flex-shrink: 0;
}

main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#planner {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}

#planner-header,
#planner-add {
  flex-shrink: 0;
  overflow-y: auto;
}

.grid-wrapper {
  flex: 1;
  position: relative;
  background: var(--bg-surface);
  overflow-y: auto;
  overflow-x: hidden;
}

.grid {
  position: relative;
  border-right: 1px solid var(--border-color);
}

.day-label {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.date-label {
  font-size: 13px;
  margin-top: 2px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0;
}

.icon-btn:hover {
  background: var(--bg-surface-2);
}

.hour-row {
  position: absolute;
  left: 56px;
  right: 0;
  height: 56px;
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-left: 1px solid var(--border-color);
  cursor: pointer;
}

#hour-row-24 {
  border-bottom: 1px solid var(--border-color);
}

.hour-label {
  position: absolute;
  left: 0;
  width: 50px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 0 8px;
  text-align: right;
}

#grid-cursor {
  position: absolute;
  left: 56px;
  right: 0;
  height: 2px;
  background-color: #d93025;
  z-index: 10;
  pointer-events: none; /* don't block clicks on the grid*/
}

#grid-cursor::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  width: 12px;
  height: 12px;
  background-color: #d93025;
  border-radius: 50%;
  transform: translateY(-50%);
}

.task-block {
  position: absolute;
  left: 56px;
  right: 8px;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  overflow: hidden;
  border-left: 3px solid transparent;
  transition: filter 0.1s ease;
}

.task-block:hover {
  filter: brightness(1.1);
}

.task-block.work {
  background: var(--work-fill);
  border-left-color: var(--work-border);
}

.task-block.personal {
  background: var(--personal-fill);
  border-left-color: var(--personal-border);
}

.task-block.urgent {
  background: var(--urgent-fill);
  border-left-color: var(--urgent-border);
}

.task-title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-block.work .task-title,
.task-block.work .task-time {
  color: var(--work-text);
}

.task-block.personal .task-title,
.task-block.personal .task-time {
  color: var(--personal-text);
}

.task-block.urgent .task-title,
.task-block.urgent .task-time {
  color: var(--urgent-text);
}

.task-time {
  font-size: 11px;
  font-family: var(--font-mono);
  opacity: 0.8;
}

.empty-state {
  position: absolute;
  left: 64px;
  top: 40px;
  font-size: 13px;
  color: var(--text-muted);
}
