/* economic-calendar-widget.css */
/* Calendário Econômico — CryptoMinds Pro IA */

/* ─── SECTION WRAPPER ─────────────────────────────────────────────────── */
.econ-cal-section {
  margin-top: 48px;
  margin-bottom: 56px;
}

.econ-cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.econ-cal-title {
  font-size: 22px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.3px;
  margin: 0;
}

.econ-cal-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.econ-cal-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.econ-cal-important-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}

.econ-cal-important-toggle input[type="checkbox"] {
  accent-color: #FFD700;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.econ-cal-important-toggle:hover {
  color: #FFD700;
}

.econ-cal-btn-refresh {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.econ-cal-btn-refresh:hover:not(:disabled) {
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.4);
  color: #FFD700;
  transform: translateY(-1px);
}

.econ-cal-btn-refresh:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ─── DAY TABS ────────────────────────────────────────────────────────── */
.econ-cal-day-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 4px;
}

.econ-cal-day-tabs::-webkit-scrollbar { display: none; }

.econ-cal-day-tab {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  padding: 8px 18px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 80px;
  text-align: center;
}

.econ-cal-day-tab:hover:not(.active) {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
}

.econ-cal-day-tab.active {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.econ-cal-day-tab.active.today {
  background: rgba(212, 175, 55, 0.2);
  color: #FFD700;
}

.econ-cal-day-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.econ-cal-day-date {
  font-size: 14px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
}

/* ─── CARD CONTAINER ──────────────────────────────────────────────────── */
.econ-cal-card {
  background: linear-gradient(145deg, rgba(20, 24, 30, 0.8) 0%, rgba(13, 15, 22, 0.95) 100%);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ─── STATS BAR ───────────────────────────────────────────────────────── */
.econ-cal-stats-bar {
  display: flex;
  gap: 0;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
  flex-wrap: wrap;
  gap: 24px;
}

.econ-cal-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.econ-cal-stat-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
}

.econ-cal-stat-val {
  font-size: 18px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: #fff;
}

.econ-cal-stat-val.highlight {
  color: #FFD700;
}

/* ─── TABLE ───────────────────────────────────────────────────────────── */
.econ-cal-table-wrapper {
  overflow-x: auto;
}

.econ-cal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.econ-cal-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #475569;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.15);
}

.econ-cal-table thead th:first-child { padding-left: 24px; border-radius: 0; }
.econ-cal-table thead th:last-child  { padding-right: 24px; }

.econ-cal-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.15s ease;
}

.econ-cal-table tbody tr:hover {
  background: rgba(139, 92, 246, 0.04);
}

.econ-cal-table tbody tr.important-row {
  background: rgba(212, 175, 55, 0.03);
}

.econ-cal-table tbody tr.important-row:hover {
  background: rgba(212, 175, 55, 0.07);
}

.econ-cal-table td {
  padding: 12px 16px;
  color: #cbd5e1;
  vertical-align: middle;
}

.econ-cal-table td:first-child { padding-left: 24px; }
.econ-cal-table td:last-child  { padding-right: 24px; }

/* Time column */
.econ-cal-time {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: #94a3b8;
  white-space: nowrap;
}

/* Stars */
.econ-cal-stars {
  display: flex;
  gap: 2px;
  white-space: nowrap;
}

.econ-cal-star {
  font-size: 11px;
  color: #FFD700;
  opacity: 0.3;
}

.econ-cal-star.active {
  opacity: 1;
}

/* Country + Event name */
.econ-cal-event-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
}

.econ-cal-flag {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1;
}

.econ-cal-event-name {
  font-weight: 600;
  color: #f1f5f9;
  font-size: 13px;
  line-height: 1.3;
}

.econ-cal-event-name.important {
  color: #fff;
}

/* Numeric cells */
.econ-cal-num {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  text-align: right;
}

.econ-cal-num.actual {
  color: #34d399;
  font-weight: 700;
}

.econ-cal-num.actual.below {
  color: #f87171;
}

.econ-cal-num.actual.inline {
  color: #fff;
}

/* Pending label */
.econ-cal-pending {
  font-size: 11px;
  color: #475569;
  font-style: italic;
}

/* Impact badge */
.econ-cal-impact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}

.econ-cal-impact.bull {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.25);
}

.econ-cal-impact.bear {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.25);
}

.econ-cal-impact.neutral {
  background: rgba(100, 116, 139, 0.12);
  color: #94a3b8;
  border-color: rgba(100, 116, 139, 0.2);
}

/* ─── EMPTY STATE ────────────────────────────────────────────────────── */
.econ-cal-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
  gap: 12px;
}

.econ-cal-empty-icon { font-size: 40px; }

.econ-cal-empty-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.econ-cal-empty-sub {
  font-size: 13px;
  color: #64748b;
  max-width: 360px;
  line-height: 1.6;
}

/* ─── LOADING STATE ──────────────────────────────────────────────────── */
.econ-cal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  gap: 16px;
}

.econ-cal-loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(139, 92, 246, 0.2);
  border-top-color: #a78bfa;
  border-radius: 50%;
  animation: econ-spin 0.8s linear infinite;
}

@keyframes econ-spin {
  to { transform: rotate(360deg); }
}

.econ-cal-loading-text {
  color: #a78bfa;
  font-weight: 600;
  font-size: 14px;
}

/* ─── FOOTER ─────────────────────────────────────────────────────────── */
.econ-cal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.15);
  flex-wrap: wrap;
  gap: 8px;
}

.econ-cal-footer-note {
  font-size: 11px;
  color: #475569;
}

.econ-cal-footer-source {
  font-size: 11px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ─── MOBILE ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .econ-cal-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .econ-cal-title { font-size: 18px; }

  .econ-cal-table { font-size: 12px; }

  .econ-cal-table td,
  .econ-cal-table thead th {
    padding: 10px 12px;
  }

  .econ-cal-table td:first-child,
  .econ-cal-table thead th:first-child { padding-left: 16px; }

  .econ-cal-table td:last-child,
  .econ-cal-table thead th:last-child { padding-right: 16px; }

  .econ-cal-event-cell { min-width: 180px; }

  .econ-cal-stats-bar { padding: 12px 16px; gap: 16px; }
  .econ-cal-footer { padding: 10px 16px; }
}
