/* ScheduleCalendar Component Styles */

.mint-schedule {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background-color: var(--bg-card);
  overflow: hidden;
}

/* Header */
.mint-schedule__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.mint-schedule__nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.mint-schedule__nav-btn {
  padding: 0.375rem;
  border-radius: 9999px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: background-color 0.15s ease, color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mint-schedule__nav-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.mint-schedule__nav-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.mint-schedule__today-btn {
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--border-color);
  cursor: pointer;
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 500;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  margin-left: 0.5rem;
}

.mint-schedule__today-btn:hover {
  background-color: var(--bg-hover);
  border-color: var(--color-primary);
}

.mint-schedule__title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.mint-schedule__view-toggle {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.mint-schedule__view-btn {
  padding: 0.25rem 0.75rem;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.mint-schedule__view-btn:not(:last-child) {
  border-right: 1px solid var(--border-color);
}

.mint-schedule__view-btn:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.mint-schedule__view-btn--active {
  background-color: var(--color-primary);
  color: white;
}

.mint-schedule__view-btn--active:hover {
  background-color: var(--color-primary);
  color: white;
}

/* Body (week/day view) */
.mint-schedule__body {
  display: flex;
  overflow: auto;
  max-height: 600px;
}

.mint-schedule__time-gutter {
  width: 3.5rem;
  flex-shrink: 0;
  border-right: 1px solid var(--border-color);
}

.mint-schedule__time-label {
  height: var(--slot-height, 2.5rem);
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-align: right;
  padding-right: 0.5rem;
  position: relative;
  top: -0.5em;
  line-height: 1;
}

.mint-schedule__day-columns {
  display: flex;
  flex: 1;
  min-width: 0;
}

.mint-schedule__day-column {
  flex: 1;
  min-width: 0;
  border-left: 1px solid var(--border-color);
  position: relative;
}

.mint-schedule__day-column:first-child {
  border-left: none;
}

.mint-schedule__day-column--today {
  background-color: color-mix(in srgb, var(--color-primary) 4%, transparent);
}

/* Day headers */
.mint-schedule__day-headers {
  display: flex;
  border-bottom: 1px solid var(--border-color);
}

.mint-schedule__day-header-gutter {
  width: 3.5rem;
  flex-shrink: 0;
  border-right: 1px solid var(--border-color);
}

.mint-schedule__day-header {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 0.5rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-left: 1px solid var(--border-color);
}

.mint-schedule__day-header:first-child {
  border-left: none;
}

.mint-schedule__day-header--today {
  color: var(--color-primary);
}

.mint-schedule__day-header-name {
  display: block;
  font-size: 0.6875rem;
}

.mint-schedule__day-header-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 0.125rem;
}

.mint-schedule__day-header--today .mint-schedule__day-header-number {
  background-color: var(--color-primary);
  color: white;
}

.mint-schedule__slot {
  height: var(--slot-height, 2.5rem);
  border-bottom: 1px solid var(--border-light);
  position: relative;
}

.mint-schedule__slot--interactive {
  cursor: pointer;
}

.mint-schedule__slot--interactive:hover {
  background-color: var(--bg-hover);
}

/* Events (3c): status tint over the card, text stays --text-primary in both
   themes; status is also written out in the time line. */
.mint-schedule__event {
  position: absolute;
  left: 2px;
  right: 2px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: var(--radius);
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  overflow: hidden;
  cursor: pointer;
  z-index: 1;
  color: var(--text-primary);
  background-color: color-mix(in srgb, var(--event-color) 16%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--event-color) 35%, transparent);
  transition: box-shadow 0.15s ease;
}

.mint-schedule__event:hover {
  box-shadow: var(--shadow-sm);
}

.mint-schedule__event--confirmed {
  --event-color: var(--mint-success);
}

.mint-schedule__event--pending {
  --event-color: var(--mint-warning);
}

.mint-schedule__event--in-progress {
  --event-color: var(--mint-info);
}

/* Cancelled: dashed hollow + strike, no status tint. */
.mint-schedule__event--cancelled {
  color: var(--text-secondary);
  background-color: var(--bg-card);
  border: 1px dashed var(--border-color);
}

.mint-schedule__event--cancelled .mint-schedule__event-title {
  font-weight: 400;
  text-decoration: line-through;
}

.mint-schedule__event-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.mint-schedule__event-time {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--text-secondary-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mint-schedule__event--cancelled .mint-schedule__event-time {
  color: var(--text-secondary);
}

/* Resize handles */
.mint-schedule__event-resize-handle {
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  cursor: ns-resize;
  z-index: 2;
}

.mint-schedule__event-resize-handle--top {
  top: 0;
}

.mint-schedule__event-resize-handle--bottom {
  bottom: 0;
}

/* Blocked slots */
.mint-schedule__blocked {
  position: absolute;
  left: 0;
  right: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 4px,
    var(--border-light) 4px,
    var(--border-light) 5px
  );
  z-index: 0;
  pointer-events: none;
}

.mint-schedule__blocked-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Now indicator */
.mint-schedule__now-indicator {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--mint-error);
  z-index: 3;
  pointer-events: none;
}

.mint-schedule__now-dot {
  position: absolute;
  left: -4px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: var(--mint-error);
}

/* Ghost (drag preview) */
.mint-schedule__ghost {
  position: absolute;
  left: 2px;
  right: 2px;
  border: 2px dashed var(--color-primary);
  background-color: var(--color-primary-soft);
  border-radius: var(--radius-sm);
  z-index: 4;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .mint-schedule__ghost {
    transition: none;
  }
}

/* Month view */
.mint-schedule__month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.mint-schedule__month-weekday {
  text-align: center;
  padding: 0.5rem 0.25rem;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.mint-schedule__month-cell {
  min-height: 5rem;
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  padding: 0.25rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.mint-schedule__month-cell:nth-child(7n) {
  border-right: none;
}

.mint-schedule__month-cell:hover {
  background-color: var(--bg-hover);
}

.mint-schedule__month-cell--today {
  background-color: color-mix(in srgb, var(--color-primary) 4%, transparent);
}

.mint-schedule__month-cell--outside {
  opacity: 0.4;
}

.mint-schedule__month-date {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  padding: 0.125rem 0.25rem;
}

.mint-schedule__month-cell--today .mint-schedule__month-date {
  color: var(--color-primary);
  font-weight: 600;
}

.mint-schedule__month-event {
  box-sizing: border-box;
  height: 1.25rem;
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0 0.375rem;
  margin-bottom: 1px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
  color: var(--text-primary);
  background-color: color-mix(in srgb, var(--event-color) 16%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--event-color) 35%, transparent);
  line-height: calc(1.25rem - 2px);
}

.mint-schedule__month-event--confirmed {
  --event-color: var(--mint-success);
}

.mint-schedule__month-event--pending {
  --event-color: var(--mint-warning);
}

.mint-schedule__month-event--in-progress {
  --event-color: var(--mint-info);
}

.mint-schedule__month-event--cancelled {
  color: var(--text-secondary);
  background-color: var(--bg-card);
  border: 1px dashed var(--border-color);
  text-decoration: line-through;
}

.mint-schedule__month-more {
  font-size: 0.6875rem;
  color: var(--color-primary);
  padding: 0 0.375rem;
  cursor: pointer;
  font-weight: 500;
}

.mint-schedule__month-more:hover {
  text-decoration: underline;
}

/* Empty / loading / error placeholder host (content comes from EmptyState) */
.mint-schedule__state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 12rem;
}
