/* ============================================
   Handy Skills For Hire — Availability Calendar
   Customer-facing widget styles
   ============================================ */

.hs-cal-root {
  max-width: 560px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid #e8e0d0;
  border-radius: 12px;
  box-shadow: 0 2px 14px rgba(15, 26, 46, 0.06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: #2a2620;
  box-sizing: border-box;
}
.hs-cal-root *,
.hs-cal-root *::before,
.hs-cal-root *::after {
  box-sizing: border-box;
}
.hs-cal-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.5rem;
  color: #1a2744;
  margin: 0 0 0.2rem;
}
.hs-cal-subtitle {
  color: #6b6354;
  font-size: 0.88rem;
  margin: 0 0 1.1rem;
}
.hs-cal-loading,
.hs-cal-error {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #6b6354;
  font-style: italic;
}
.hs-cal-error { color: #8a001a; }

.hs-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  gap: 0.5rem;
}
.hs-cal-month-label {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.2rem;
  color: #1a2744;
  flex: 1;
  text-align: center;
}
.hs-cal-nav {
  background: #1a2744;
  color: #d4a24e;
  border: none;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 6px;
  font-size: 1.4rem;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  transition: background 0.15s;
  padding: 0;
}
.hs-cal-nav:hover { background: #0f1a2e; }
.hs-cal-nav:focus { outline: 2px solid #d4a24e; outline-offset: 2px; }

.hs-cal-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-bottom: 4px;
}
.hs-cal-dow {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #6b6354;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0;
}

.hs-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  background: #e8e0d0;
  padding: 3px;
  border-radius: 8px;
}

.hs-cal-cell {
  background: #fff;
  aspect-ratio: 1 / 1;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hs-cal-cell--empty {
  background: transparent;
}

.hs-cal-fill {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, #2a5d8f 0%, #4a8fc2 100%);
  transition: height 0.4s ease-out;
  z-index: 1;
}

.hs-cal-num {
  position: relative;
  z-index: 2;
  font-weight: 700;
  font-size: 0.95rem;
  color: #1a2744;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.85);
  padding: 0;
}

.hs-cal-cell--closed {
  background: repeating-linear-gradient(45deg, #ededed 0 6px, #d8d8d8 6px 12px);
}
.hs-cal-cell--closed .hs-cal-num {
  color: #999;
  text-shadow: none;
  font-size: 0.85rem;
}
.hs-cal-closed-label {
  position: absolute;
  bottom: 3px;
  left: 0; right: 0;
  text-align: center;
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #777;
  z-index: 2;
}

.hs-cal-cell--past {
  background: #f5f1e8;
  opacity: 0.5;
}
.hs-cal-cell--past .hs-cal-num {
  color: #b8b09e;
  text-shadow: none;
}

.hs-cal-cell--today {
  outline: 2px solid #d4a24e;
  outline-offset: -2px;
  z-index: 3;
}

.hs-cal-legend {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  font-size: 0.78rem;
  color: #6b6354;
}
.hs-cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.hs-cal-legend-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.hs-cal-legend-open { background: #fff; }
.hs-cal-legend-some {
  background: linear-gradient(0deg, #4a8fc2 50%, #fff 50%);
}
.hs-cal-legend-full { background: #2a5d8f; }
.hs-cal-legend-closed {
  background: repeating-linear-gradient(45deg, #ededed 0 3px, #d8d8d8 3px 6px);
}

.hs-cal-footer {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e8e0d0;
  font-size: 0.85rem;
  color: #6b6354;
  text-align: center;
}
.hs-cal-footer a {
  color: #1a2744;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid #d4a24e;
}
.hs-cal-footer a:hover {
  color: #d4a24e;
}

@media (max-width: 480px) {
  .hs-cal-root { padding: 1rem; margin: 1rem auto; }
  .hs-cal-num { font-size: 0.8rem; }
  .hs-cal-title { font-size: 1.3rem; }
}
