/* ═══════════════════════════════════════════════════════════════════════ */
/* NexusLoom Calendar — Default Stylesheet                                  */
/* ─────────────────────────────────────────────────────────────────────── */
/* Drop this into the plugin's public CSS file.                             */
/* All rules are scoped under .nlical-wrap to avoid leaking into the        */
/* host theme. Colors use the plugin's CSS custom properties so shortcode   */
/* attributes (data-color-booked, data-color-available, data-color-today)   */
/* continue to override defaults. Typography uses a neutral stack so it     */
/* inherits the parent site's font where possible.                          */
/* ═══════════════════════════════════════════════════════════════════════ */
/* ─── 1. ROOT CONTAINER ───────────────────────────────────────────────── */
/* Establishes default color tokens, resets box-sizing, sets base font.    */
.nlical-wrap {
  --nl-booked: #c7cad1;
  --nl-available: #2e7d4f;
  --nl-today: #c9a96e;
  --nl-text: inherit;
  --nl-muted: rgba(0, 0, 0, 0.55);
  --nl-border: rgba(0, 0, 0, 0.08);
  --nl-bg-subtle: rgba(0, 0, 0, 0.02);
  font-family: inherit;
  color: var(--nl-text);
  line-height: 1.5;
  box-sizing: border-box;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 24px;
}
.nlical-wrap *,
.nlical-wrap *::before,
.nlical-wrap *::after {
  box-sizing: border-box;
}
/* ─── 2. MONTHS WRAPPER ──────────────────────────────────────────────── */
/* Vertical stack of months by default. Plugins that render multiple      */
/* months can opt into a responsive grid by adding data-columns="2" etc.  */
.nlical-months {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.nlical-month {
  width: 100%;
}
/* ─── 3. MONTH HEADER ("June 2026") ──────────────────────────────────── */
.nlical-month-header {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--nl-border);
}
/* ─── 4. WEEKDAY LABEL ROW (Su Mo Tu We Th Fr Sa) ────────────────────── */
.nlical-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.nlical-day-labels {
  margin-bottom: 6px;
}
.nlical-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nl-muted);
  text-align: center;
  padding: 6px 0;
}
/* ─── 5. DAY CELLS — BASE ────────────────────────────────────────────── */
/* Square cells, centered numbers, smooth hover/focus transitions.        */
.nlical-day {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 400;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease,
              border-color 0.2s ease, transform 0.2s ease;
  position: relative;
  user-select: none;
}
/* ─── 5a. EMPTY CELLS (leading/trailing month padding) ───────────────── */
.nlical-day--empty {
  background: transparent;
  pointer-events: none;
  opacity: 0;
}
/* ─── 5b. AVAILABLE DAYS ─────────────────────────────────────────────── */
/* Uses --nl-available via semi-transparent rgb channels for the tint.    */
/* color-mix() falls back gracefully; solid fallback provided first.      */
.nlical-day--available {
  background: var(--nl-bg-subtle);
  background: color-mix(in srgb, var(--nl-available) 8%, transparent);
  border: 1px solid var(--nl-border);
  border-color: color-mix(in srgb, var(--nl-available) 18%, transparent);
  color: var(--nl-text);
  cursor: default;
}
.nlical-day--available:hover {
  background: color-mix(in srgb, var(--nl-available) 18%, transparent);
  border-color: var(--nl-available);
  transform: scale(1.05);
}
/* ─── 5c. BOOKED DAYS ────────────────────────────────────────────────── */
/* Dimmed + strikethrough + diagonal hash pattern for unambiguous state.  */
.nlical-day--booked {
  background: var(--nl-bg-subtle);
  border: 1px solid var(--nl-border);
  color: var(--nl-muted);
  opacity: 0.55;
  text-decoration: line-through;
  cursor: not-allowed;
}
.nlical-day--booked::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    transparent 0,
    transparent 4px,
    color-mix(in srgb, var(--nl-booked) 25%, transparent) 4px,
    color-mix(in srgb, var(--nl-booked) 25%, transparent) 5px
  );
  pointer-events: none;
  border-radius: inherit;
}
/* ─── 5d. TODAY ──────────────────────────────────────────────────────── */
/* Stronger visual weight so the user can orient quickly.                 */
.nlical-day--today {
  background: color-mix(in srgb, var(--nl-today) 18%, transparent);
  border: 1px solid var(--nl-today);
  color: var(--nl-today);
  font-weight: 600;
}
/* ─── 5e. PAST DAYS ──────────────────────────────────────────────────── */
.nlical-day--past {
  color: var(--nl-muted);
  background: var(--nl-bg-subtle);
  opacity: 0.4;
}
/* ─── 5f. TOOLTIP (native title attr) ────────────────────────────────── */
.nlical-day--booked[title] {
  cursor: help;
}
/* ─── 6. PREV / NEXT NAVIGATION ──────────────────────────────────────── */
.nlical-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--nl-border);
}
.nlical-nav-btn {
  background: transparent;
  border: 1px solid var(--nl-border);
  color: var(--nl-text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 3px;
  transition: background-color 0.2s ease, color 0.2s ease,
              border-color 0.2s ease;
}
.nlical-nav-btn:hover,
.nlical-nav-btn:focus-visible {
  background: var(--nl-today);
  border-color: var(--nl-today);
  color: #fff;
  outline: none;
}
.nlical-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
/* ─── 7. LEGEND ──────────────────────────────────────────────────────── */
.nlical-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--nl-border);
}
.nlical-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--nl-muted);
}
.nlical-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.nlical-dot--available {
  background: color-mix(in srgb, var(--nl-available) 35%, transparent);
  border: 1px solid var(--nl-available);
}
.nlical-dot--booked {
  background: transparent;
  border: 1px solid var(--nl-booked);
  position: relative;
  overflow: hidden;
}
.nlical-dot--booked::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    transparent 0,
    transparent 1.5px,
    var(--nl-booked) 1.5px,
    var(--nl-booked) 2.5px
  );
}
.nlical-dot--today {
  background: var(--nl-today);
}
/* ─── 8. BRANDING FOOTER ─────────────────────────────────────────────── */
.nlical-branding {
  text-align: center;
  margin-top: 14px;
}
.nlical-branding a {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--nl-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}
.nlical-branding a:hover {
  opacity: 1;
}
.nlical-logo {
  flex-shrink: 0;
}
/* ─── 9. RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nlical-wrap { padding: 18px; }
  .nlical-month-header { font-size: 16px; margin-bottom: 12px; }
  .nlical-day { font-size: 12px; }
  .nlical-label { font-size: 10px; }
  .nlical-nav-btn { padding: 7px 12px; font-size: 11px; }
  .nlical-legend { gap: 12px; }
  .nlical-legend-item { font-size: 10px; }
}
@media (max-width: 480px) {
  .nlical-wrap { padding: 14px; }
  .nlical-grid { gap: 2px; }
  .nlical-day { font-size: 11px; border-radius: 3px; }
  .nlical-month-header { font-size: 15px; }
  .nlical-nav-btn { padding: 6px 10px; font-size: 10px; }
  .nlical-legend { gap: 10px; }
  .nlical-legend-item { font-size: 9px; gap: 6px; }
  .nlical-dot { width: 8px; height: 8px; }
}
/* ─── 10. DARK MODE SUPPORT ──────────────────────────────────────────── */
/* Automatically adjusts borders and muted text when host site uses dark  */
/* mode. Triggers via prefers-color-scheme OR if a parent has .dark /     */
/* [data-theme="dark"] classes (common patterns).                         */
@media (prefers-color-scheme: dark) {
  .nlical-wrap:not([data-theme="light"]) {
    --nl-muted: rgba(255, 255, 255, 0.55);
    --nl-border: rgba(255, 255, 255, 0.1);
    --nl-bg-subtle: rgba(255, 255, 255, 0.03);
  }
}
.dark .nlical-wrap,
[data-theme="dark"] .nlical-wrap,
.nlical-wrap[data-theme="dark"] {
  --nl-muted: rgba(255, 255, 255, 0.55);
  --nl-border: rgba(255, 255, 255, 0.1);
  --nl-bg-subtle: rgba(255, 255, 255, 0.03);
}
/* ─── 11. PRINT STYLES ───────────────────────────────────────────────── */
@media print {
  .nlical-nav,
  .nlical-branding { display: none; }
  .nlical-day--booked::after { background: none; }
  .nlical-day { border: 1px solid #999 !important; }
}
/* ─── 12. TITLE ──────────────────────────────────────────────────────── */
.nlical-title {
  font-size: 1.35rem;
  font-weight: 600;
  text-align: center;
  margin: 0 0 1.25em;
}
/* ─── 13. ERROR STATE ────────────────────────────────────────────────── */
.nlical-error {
  padding: 12px 16px;
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.15);
  border-radius: 4px;
  color: #991b1b;
  font-size: 0.9rem;
}
/* ─── 14. LOADING STATE ──────────────────────────────────────────────── */
.nlical-loading .nlical-months {
  opacity: 0.5;
  pointer-events: none;
}
