  /* ============================================================
   FeatherCast Chart Widget â€” Embeddable Styles
   Visual language derived from ³ÉÈË´óÆ¬Activity Dashboard reference
   ============================================================ */

/* --- Google Font --- */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700;800&display=swap');

/* --- Widget Shell --- */
.fc-widget {
  font-family: 'Open Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: #0a233f;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(10, 35, 63, 0.12);
  padding: clamp(18px, 5vw, 32px);
  max-width: 1537px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

/* --- Header --- */
.fc-widget__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(14px, 3vw, 22px);
}

.fc-widget__title {
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #0a233f;
  margin: 0;
}

.fc-widget__timestamp {
  font-size: 0.8rem;
  font-weight: 600;
  color: #425066;
  white-space: nowrap;
}

/* --- Chart Container --- */
.fc-widget__chart-wrap {
  position: relative;
  width: 100%;
  min-height: 220px;
}

.fc-widget__chart-wrap canvas {
  width: 100% !important;
  max-height: 340px;
}

/* --- Legend --- */
.fc-widget__legend {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 24px);
  margin-bottom: clamp(10px, 2.5vw, 18px);
}

.fc-widget__legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: clamp(12px, 1.4vw, 14px);
  font-weight: 600;
  color: #0a233f;
}

.fc-widget__legend-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* --- State Messages (loading, error, empty) --- */
.fc-widget__state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  text-align: center;
  gap: 10px;
  padding: 24px 16px;
}

.fc-widget__state-icon {
  font-size: 28px;
  line-height: 1;
}

.fc-widget__state-heading {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
}

.fc-widget__state-text {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
  max-width: 380px;
}

/* Loading */
.fc-widget__state--loading .fc-widget__state-heading {
  color: #0a233f;
}
.fc-widget__state--loading .fc-widget__state-text {
  color: #425066;
}

/* Spinner */
.fc-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #cde7f3;
  border-top-color: #236595;
  border-radius: 50%;
  animation: fc-spin 0.8s linear infinite;
}

@keyframes fc-spin {
  to { transform: rotate(360deg); }
}

/* Error */
.fc-widget__state--error {
  background: #fdecee;
  border: 1px solid rgba(190, 18, 60, 0.2);
  border-radius: 12px;
}
.fc-widget__state--error .fc-widget__state-heading {
  color: #9f1f38;
}
.fc-widget__state--error .fc-widget__state-text {
  color: #0a233f;
}

/* Empty */
.fc-widget__state--empty {
  background: #e6f1fb;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 12px;
}
.fc-widget__state--empty .fc-widget__state-heading {
  color: #0a233f;
}
.fc-widget__state--empty .fc-widget__state-text {
  color: #425066;
}

/* --- Footnote --- */
.fc-widget__footnote {
  background: #f5f7fb;
  border: 1px solid rgba(10, 35, 63, 0.12);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: clamp(12px, 3vw, 20px);
  font-size: 0.85rem;
  font-weight: 600;
  color: #425066;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fc-widget__footnote-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #236595;
  flex-shrink: 0;
}

/* --- Chart.js Tooltip Override --- */
.fc-tooltip {
  background: #e9e9ea !important;
  color: #0a233f !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  border-radius: 14px !important;
  padding: 10px 14px !important;
  font-family: 'Open Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  box-shadow: 0 10px 26px rgba(10, 35, 63, 0.28) !important;
  pointer-events: none;
}

.fc-tooltip__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #425066;
  margin-bottom: 4px;
}

.fc-tooltip__value {
  font-size: 15px;
  font-weight: 800;
  color: #0a233f;
}

.fc-tooltip__row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #0a233f;
  margin-top: 4px;
}

.fc-tooltip__swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* --- Closed / Holiday Banner --- */
.fc-widget__closed-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  text-align: center;
  background: #f0f2f5;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 32px 24px;
  gap: 8px;
}

.fc-widget__closed-banner-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #425066;
  margin: 0;
}

.fc-widget__closed-banner-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #6b7280;
  margin: 0;
  max-width: 400px;
  line-height: 1.5;
}

/* --- Responsive --- */
@media (max-width: 940px) {
  .fc-widget {
    padding: clamp(14px, 4vw, 24px);
  }
  .fc-widget__chart-wrap canvas {
    max-height: 320px;
  }
}

@media (max-width: 600px) {
  .fc-widget {
    border-radius: 14px;
    padding: 14px;
  }
  .fc-widget__header {
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
  }
  .fc-widget__legend {
    gap: 12px;
    margin-bottom: 10px;
  }
  .fc-widget__legend-item {
    font-size: 12px;
  }
  .fc-widget__chart-wrap {
    min-height: 180px;
  }
  .fc-widget__chart-wrap canvas {
    max-height: 280px;
  }
  .fc-widget__footnote {
    font-size: 0.78rem;
    padding: 8px 10px;
    margin-top: 10px;
  }
  .fc-widget__closed-banner {
    min-height: 200px;
    padding: 24px 16px;
  }
  .fc-tooltip {
    font-size: 12px !important;
    padding: 8px 10px !important;
    border-radius: 10px !important;
  }
}

@media (max-width: 480px) {
  .fc-widget {
    border-radius: 12px;
    padding: 12px;
  }
  .fc-widget__title {
    font-size: 16px;
  }
  .fc-widget__timestamp {
    font-size: 0.7rem;
  }
  .fc-widget__chart-wrap canvas {
    max-height: 240px;
  }
  .fc-widget__legend-swatch {
    width: 12px;
    height: 12px;
  }
}
