/* --- ADHD Budget Planner: Additional Component Styles (appended to app.css) --- */

/* ================================
   PLANNER / CALENDAR SCREEN
================================ */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-top: 10px;
}

.calendar-day-header {
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  padding: 4px 0;
}

.calendar-day {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  position: relative;
  touch-action: manipulation;
  transition: background 0.1s ease;
}

.calendar-day.today {
  background: var(--accent-primary);
  color: #ffffff;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.calendar-day.has-bill::after {
  content: '';
  position: absolute;
  bottom: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-gold);
}

.calendar-day.payday {
  border: 2px solid var(--accent-vivid);
  color: var(--accent-primary);
  font-weight: 700;
}

.calendar-day.other-month {
  opacity: 0.25;
}

.calendar-day.over-budget {
  background: rgba(225, 29, 72, 0.08);
  color: var(--accent-warn);
}

/* ================================
   SAVINGS GOALS CARDS
================================ */
.goal-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.goal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.goal-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.goal-amounts {
  font-size: 12px;
  color: var(--text-muted);
}

.goal-progress-track {
  height: 10px;
  background: var(--surface-hover);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 8px;
}

.goal-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-vivid), var(--accent-primary));
  border-radius: var(--radius-full);
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.goal-progress-fill.complete {
  background: linear-gradient(90deg, #34d399, #059669);
}

.goal-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
}

/* ================================
   TRANSACTION HISTORY LIST
================================ */
.tx-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
}

.tx-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.tx-info {
  flex: 1;
  min-width: 0;
}

.tx-note {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-meta {
  font-size: 11px;
  color: var(--text-dim);
}

.tx-amount {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-warn);
  flex-shrink: 0;
}

/* ================================
   BILL MARK-PAID INTERACTION
================================ */
.bill-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.bill-row.paid {
  opacity: 0.5;
  background: var(--surface-hover);
}

.bill-row-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-gold);
  flex-shrink: 0;
}

.bill-row.paid .bill-row-dot {
  background: var(--accent-vivid);
}

.bill-row-info {
  flex: 1;
}

.bill-row-name {
  font-weight: 600;
  font-size: 14px;
}

.bill-row-due {
  font-size: 11px;
  color: var(--text-dim);
}

.bill-row-amount {
  font-weight: 700;
  font-size: 15px;
  margin-right: 12px;
}

/* ================================
   DEBT VISUAL PROGRESS
================================ */
.debt-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
}

.debt-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.debt-name {
  font-size: 15px;
  font-weight: 700;
}

.debt-apr-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(225, 29, 72, 0.1);
  color: var(--accent-warn);
  font-weight: 700;
}

.debt-balance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.debt-balance-current {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-warn);
}

.debt-track {
  height: 8px;
  background: var(--surface-hover);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.debt-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-warn), #f97316);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

/* ================================
   ONBOARDING SETUP WIZARD
================================ */
.wizard-card {
  background: var(--surface-card);
  border: 2px solid var(--accent-primary);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 20px;
}

.wizard-step {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.wizard-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

.wizard-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ================================
   TOAST NOTIFICATION SYSTEM
================================ */
.toast-container {
  position: fixed;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 14px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}

.toast {
  background: var(--text-main);
  color: var(--bg-app);
  border-radius: var(--radius-full);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  animation: toastIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             toastOut 0.2s ease forwards 2.5s;
}

@keyframes toastIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(-8px); }
}

/* ================================
   CONFETTI / CELEBRATION EFFECT
================================ */
@keyframes confetti-fall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(120vh) rotate(720deg); opacity: 0; }
}

.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  pointer-events: none;
  animation: confetti-fall 2s ease-in forwards;
  z-index: 300;
}

/* ================================
   EMPTY STATES (No Data)
================================ */
.empty-state {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-dim);
}

.empty-state-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.empty-state-sub {
  font-size: 13px;
  line-height: 1.5;
}

/* ================================
   DATA HEALTH BANNER (Safari IOS Warning)
================================ */
.data-health-banner {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.1), rgba(217, 119, 6, 0.05));
  border: 1px solid rgba(217, 119, 6, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: none;
}

.data-health-banner.visible {
  display: flex;
  align-items: center;
  gap: 12px;
}

.data-health-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.data-health-text {
  flex: 1;
  font-size: 13px;
  color: var(--text-main);
}

.data-health-text strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

/* ================================
   SCROLLBAR STYLING (Chrome/Edge)
================================ */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
}

/* ================================
   PRINT STYLES (for PDF Guide integration)
================================ */
@media print {
  .nav-dock,
  .top-actions,
  .modal-overlay,
  .toast-container {
    display: none !important;
  }
  
  .main-wrapper {
    padding: 0;
  }
  
  body {
    background: #ffffff;
    color: #000000;
  }
}

/* ================================
   FOCUS OUTLINE ACCESSIBILITY
================================ */
:focus-visible {
  outline: 3px solid var(--accent-vivid);
  outline-offset: 2px;
  border-radius: 4px;
}
