/* Yearly planner — additive styles on top of styles.css */

/* Tigers theme palette (Littleton, MA) — orange + black */
.hero, .site-header, .site-footer, .main-content {
  /* scope palette overrides to the calendar page; styles.css vars already cascade */
}
:root {
  --tiger-orange: #f28a1c;
  --tiger-orange-deep: #d96c10;
  --tiger-black: #1a1a1a;
  --tiger-black-soft: #2b2b2b;
  --tiger-gold: #f6c560;
}

/* Littleton Tigers header wordmark */
.brand-tigers {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  line-height: 1;
}
.brand-tigers:hover { text-decoration: none; }
.brand-paw {
  width: 48px; height: 48px;
  fill: var(--tiger-orange-deep);
  flex: 0 0 auto;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.1));
}
.brand-stack { display: flex; flex-direction: column; gap: 2px; }
.brand-school {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--tiger-black);
}
.brand-app {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tiger-orange-deep);
}
@media (max-width: 640px) {
  .brand-paw { width: 38px; height: 38px; }
  .brand-school { font-size: 20px; }
  .brand-app { font-size: 10px; letter-spacing: 0.16em; }
}

/* Subtle tiger-stripe top border on the header */
.site-header {
  border-top: 4px solid var(--tiger-orange);
  background:
    repeating-linear-gradient(90deg,
      var(--tiger-orange) 0 24px,
      var(--tiger-black) 24px 28px,
      var(--tiger-orange) 28px 52px,
      var(--tiger-black) 52px 56px) top / 100% 4px no-repeat,
    var(--bg-elev);
}

.hero-compact { padding: 40px 0 28px; }
.hero-eyebrow {
  color: var(--tiger-orange-deep);
  border-color: var(--tiger-gold);
  background: #fff6e8;
}

/* Tigers hero */
.hero-tigers {
  background:
    linear-gradient(180deg, #fff2dc 0%, var(--bg) 100%);
  position: relative;
  overflow: hidden;
}
.hero-tigers .hero-title {
  font-size: clamp(48px, 8vw, 88px);
  margin: 14px 0 4px;
  letter-spacing: -0.015em;
  line-height: 1;
}
.hero-tigers .hero-go {
  color: var(--tiger-black);
}
.hero-word-tigers {
  background: linear-gradient(90deg, var(--tiger-orange) 0%, var(--tiger-orange-deep) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
}
.hero-sub {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(16px, 2vw, 20px);
  color: var(--tiger-black);
  margin: 0 0 14px;
  letter-spacing: 0.02em;
}
.hero-paw-watermark {
  position: absolute;
  right: -30px;
  top: 30px;
  width: 320px;
  height: 320px;
  fill: var(--tiger-orange);
  opacity: 0.08;
  pointer-events: none;
  transform: rotate(-15deg);
}
@media (max-width: 640px) {
  .hero-paw-watermark { width: 220px; height: 220px; right: -50px; top: 20px; }
}

/* Primary button tinted tiger */
.btn-primary {
  background: var(--tiger-black);
  color: #fff;
}
.btn-primary:hover { background: var(--tiger-orange-deep); }

/* Tigers footer block */
.site-footer-tigers {
  background: linear-gradient(180deg, var(--tiger-black) 0%, var(--tiger-black-soft) 100%);
  color: #e8d6bd;
  position: relative;
}
.site-footer-tigers::before {
  content: "";
  display: block;
  height: 4px;
  background: repeating-linear-gradient(90deg,
    var(--tiger-orange) 0 24px,
    var(--tiger-black) 24px 28px,
    var(--tiger-orange) 28px 52px,
    var(--tiger-black) 52px 56px);
}
.tigers-mark {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tigers-paw {
  width: 42px; height: 42px;
  fill: var(--tiger-orange);
  flex: 0 0 auto;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.35));
}
.tigers-text { display: flex; flex-direction: column; line-height: 1.1; }
.tigers-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: #fff;
  text-transform: uppercase;
}
.tigers-sub {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tiger-orange);
  margin-top: 3px;
}
.site-footer-tigers .footer-fine {
  border-top-color: rgba(242, 138, 28, 0.25);
  color: #b39a7c;
}

/* Toolbar */
.planner-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.toolbar-group {
  display: flex; align-items: center; gap: 8px;
}
.toolbar-label {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 600;
}
.toolbar-select {
  font: inherit;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
}
.toolbar-select:disabled {
  color: var(--ink-mute);
  background: #f4ece0;
  cursor: not-allowed;
}
.toolbar-actions-right { margin-left: auto; }
.toolbar-status { gap: 6px; }

.status-dot {
  width: 9px; height: 9px; border-radius: 50%;
  display: inline-block;
  background: var(--ink-mute);
  box-shadow: 0 0 0 3px rgba(138, 122, 109, 0.15);
}
.status-offline { background: #b5a898; box-shadow: 0 0 0 3px rgba(181, 168, 152, 0.18); }
.status-ok      { background: #3a8a3a; box-shadow: 0 0 0 3px rgba(58, 138, 58, 0.18); }
.status-busy    { background: var(--ttek-orange); box-shadow: 0 0 0 3px rgba(240, 128, 32, 0.20); animation: pulse 1.1s ease-in-out infinite; }
.status-error   { background: var(--barn); box-shadow: 0 0 0 3px rgba(122, 42, 34, 0.22); }

@keyframes pulse {
  0%,100% { transform: scale(1);   opacity: 1; }
  50%     { transform: scale(1.25); opacity: 0.65; }
}
.status-text { font-size: 13px; color: var(--ink-soft); }

.planner-note {
  font-size: 13px;
  color: var(--ink-soft);
  background: #fbf5e6;
  border: 1px dashed #e3cba5;
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 18px;
}
.planner-note em { font-style: normal; font-weight: 600; color: var(--ink); }
.planner-note.is-hidden { display: none; }

/* Year grid */
.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.month-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.month-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(180deg, #f4ecd9 0%, #ede2c9 100%);
  border-bottom: 1px solid var(--line-strong);
}
.month-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
.month-year {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
}

.day-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.day-row {
  display: grid;
  grid-template-columns: 34px 42px 1fr;
  align-items: center;
  gap: 8px;
  padding: 3px 10px;
  border-top: 1px solid #f2ebdc;
  min-height: 32px;
  position: relative;
}
.day-row:first-child { border-top: 0; }

.day-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
}
.day-dow {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
}

.day-row.is-weekend { background: #faf3e2; }
.day-row.is-weekend .day-num { color: var(--wood-dark); }
.day-row.is-today {
  background: linear-gradient(90deg, rgba(240,128,32,0.14) 0%, rgba(240,128,32,0.04) 80%, transparent 100%);
}
.day-row.is-today .day-num { color: var(--ttek-orange-dark); }
.day-row.is-today::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 3px; background: var(--ttek-orange); border-radius: 0 3px 3px 0;
}

.day-input {
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px dashed transparent;
  outline: 0;
  padding: 3px 4px;
  width: 100%;
  min-width: 0;
  border-radius: 2px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.day-input::placeholder { color: #c6b9a6; font-style: italic; }
.day-input:hover { border-bottom-color: var(--line-strong); }
.day-input:focus {
  border-bottom-color: var(--wood-dark);
  background: #fffdf5;
}
.day-input:disabled {
  color: var(--ink-mute);
  cursor: not-allowed;
}

.day-row.is-saving .day-input { background: #fff8ec; }
.day-row.is-error .day-input { background: #fbecea; border-bottom-color: var(--barn); }
.day-row.is-multi { position: relative; }
.day-more {
  font-size: 10px;
  color: var(--ink-mute);
  background: #eee3cf;
  border-radius: 999px;
  padding: 1px 7px;
  margin-left: 6px;
  cursor: help;
  flex: 0 0 auto;
}

/* Modal */
.modal {
  position: fixed; inset: 0;
  z-index: 100;
  display: grid; place-items: center;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(43, 32, 24, 0.48);
  backdrop-filter: blur(2px);
}
.modal-panel {
  position: relative;
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px 24px;
  width: min(520px, calc(100vw - 32px));
  border: 1px solid var(--line);
}
.modal-title {
  font-family: var(--font-serif);
  font-size: 22px;
  margin: 0 0 6px;
}
.modal-desc { color: var(--ink-soft); font-size: 14px; margin: 0 0 16px; }
.modal-desc code, .setup-fine code, .setup-list code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: #f1e7d4;
  border: 1px solid #e3d4b8;
  padding: 1px 6px;
  border-radius: 4px;
}
.modal-field { display: grid; gap: 6px; margin-bottom: 18px; }
.modal-field span {
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 600;
}
.modal-field input {
  font: inherit;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: #fff;
}
.modal-field input:focus { outline: 2px solid var(--wood-dark); outline-offset: 1px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Setup help */
.setup-list {
  margin: 0 0 10px 22px;
  padding: 0;
  display: grid; gap: 8px;
  color: var(--ink-soft);
  font-size: 15px;
}
.setup-list li { padding-left: 2px; }
.setup-fine {
  font-size: 13px; color: var(--ink-mute);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-top: 6px;
}

/* Responsive */
@media (max-width: 640px) {
  .planner-toolbar { gap: 10px; }
  .toolbar-actions-right { margin-left: 0; }
  .year-grid { grid-template-columns: 1fr; }
  .day-row { grid-template-columns: 30px 38px 1fr; }
}

/* Print — one compact page-ish view */
@media print {
  .planner-toolbar, .planner-note, #setupHelp, .modal { display: none !important; }
  .year-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .month-card { box-shadow: none; border-color: #bbb; break-inside: avoid; }
  .month-head { background: #f2ebdc; }
  .day-input { border-bottom: 0; }
}
