/* Delta Force TAC-COM — Windows 11-Style Tactical Calendar & Real-Time Time Slot Grid */
.dfh-cal-card {
  background: #10131a;
  border: 1px solid rgba(158, 233, 57, 0.28);
  padding: 16px;
}

.dfh-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dfh-cal-nav-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.dfh-cal-btn {
  background: #151a21;
  color: #e1e2eb;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.dfh-cal-btn:hover:not(:disabled) {
  border-color: #84cc16;
  color: #9ee939;
}

.dfh-cal-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.dfh-cal-select {
  background: #151a21;
  color: #e1e2eb;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 600;
}

.dfh-cal-weekdays,
.dfh-cal-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.dfh-cal-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  padding: 4px 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dfh-cal-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 4px 2px;
  background: #151a21;
  color: #e1e2eb;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.dfh-cal-day:hover:not(:disabled):not(.is-empty) {
  border-color: #84cc16;
  background: #1c222b;
}

.dfh-cal-day.is-empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.dfh-cal-day.is-past {
  background: #0d1016;
  color: #475569;
  border-color: rgba(255, 255, 255, 0.04);
  cursor: not-allowed;
  text-decoration: line-through;
}

.dfh-cal-day.is-today {
  border: 1.5px solid #84cc16;
  box-shadow: inset 0 0 0 1px rgba(132, 204, 22, 0.35);
}

.dfh-cal-day.is-selected {
  background: #65a30d;
  color: #0b0e14;
  border-color: #9ee939;
  font-weight: 800;
}

.dfh-cal-day.is-selected .dfh-cal-dot {
  background: #0b0e14;
}

.dfh-cal-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  margin-top: 2px;
  background: #65a30d;
}

/* Color Legend */
.dfh-slot-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 10px 12px;
  background: #0b0e14;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
  color: #cbd5e1;
}

.dfh-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dfh-legend-swatch {
  width: 12px;
  height: 12px;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

/* Time Slot Grid (00:00 - 24:00) */
.dfh-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 6px;
  max-height: 440px;
  overflow-y: auto;
  padding: 2px;
}

.dfh-slot-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3px;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
  font-variant-numeric: tabular-nums;
  transition: transform 0.1s, box-shadow 0.15s, border-color 0.15s;
}

.dfh-slot-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.dfh-slot-meta {
  font-size: 10.5px;
  line-height: 1.25;
  opacity: 0.92;
}

/* 5 Mandatory Status Colors */
.dfh-slot-green {
  background: rgba(101, 163, 13, 0.18);
  border-color: #65a30d;
  color: #ecfccb;
  cursor: pointer;
}

.dfh-slot-green:hover {
  background: rgba(101, 163, 13, 0.34);
  box-shadow: 0 0 0 1px #9ee939;
}

.dfh-slot-green.is-short-range {
  opacity: 0.72;
  border-style: dashed;
}

.dfh-slot-red {
  background: rgba(220, 64, 64, 0.22);
  border-color: #dc4040;
  color: #fecaca;
  cursor: not-allowed;
}

.dfh-slot-yellow {
  background: rgba(234, 179, 8, 0.22);
  border-color: #eab308;
  color: #fef08a;
  cursor: not-allowed;
}

.dfh-slot-gray {
  background: rgba(107, 114, 128, 0.16);
  border-color: #6b7280;
  color: #9ca3af;
  cursor: not-allowed;
}

.dfh-slot-blue {
  background: rgba(59, 130, 246, 0.34) !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 0 1px #60a5fa;
  cursor: pointer;
}

/* Responsive Mobile (< 640px) */
@media (max-width: 639px) {
  .dfh-cal-card {
    padding: 12px;
  }
  .dfh-cal-day {
    min-height: 36px;
    font-size: 12px;
  }
  .dfh-slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 360px;
  }
  .dfh-slot-btn {
    padding: 7px 7px;
  }
  .dfh-slot-time {
    font-size: 11px;
  }
}

/* Equal-Height Tactical Service & Item Grids (Customizer --df-grid-cols & --df-card-gap) */
.dfh-dynamic-grid {
  display: grid;
  grid-template-columns: repeat(var(--df-grid-cols, 3), minmax(0, 1fr));
  gap: var(--df-card-gap, 20px);
  align-items: stretch;
}

.dfh-equal-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.dfh-equal-card:hover {
  transform: translateY(-3px);
  border-color: rgba(158, 233, 57, 0.55);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(158, 233, 57, 0.2);
}

@media (max-width: 1023px) {
  .dfh-dynamic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .dfh-dynamic-grid {
    grid-template-columns: 1fr;
  }
}
