/* Main theme styles for Her Emotional Dashboard PRO */

:root {
  --her-bg-gradient-start: #ffe4ef;
  --her-bg-gradient-end: #ffeef8;
  --her-card-bg: #ffffff;
  --her-accent: #ff7fb0;
  --her-accent-soft: #ffb6d6;
  --her-text-main: #333333;
  --her-text-soft: #777777;
  --her-border-soft: rgba(255, 143, 188, 0.35);
  --her-shadow-soft: 0 10px 25px rgba(255, 143, 188, 0.25);
  --her-radius-xl: 18px;
}

body.page-template-page-her-dashboard {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(145deg, var(--her-bg-gradient-start), var(--her-bg-gradient-end));
  color: var(--her-text-main);
}

#her-dashboard-wrapper {
  min-height: 100vh;
  padding: 20px 12px 40px;
  box-sizing: border-box;
}

.her-container {
  max-width: 1160px;
  margin: 0 auto;
}

.her-page-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #e93378;
}

.her-page-subtitle {
  font-size: 0.9rem;
  color: var(--her-text-soft);
  margin-bottom: 20px;
}

/* Cards */
.her-card {
  background: var(--her-card-bg);
  border-radius: var(--her-radius-xl);
  box-shadow: var(--her-shadow-soft);
  padding: 16px 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.6);
  position: relative;
  overflow: hidden;
}

.her-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top left, rgba(255,180,210,0.32), transparent 55%);
  opacity: 0.65;
}

.her-card-inner {
  position: relative;
}

/* Section headers */
.her-section-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.her-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255,188,214,0.22);
  color: #b7356a;
}

/* Buttons */
.her-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  background: linear-gradient(135deg, var(--her-accent), #ff99c5);
  color: white;
  box-shadow: 0 8px 18px rgba(255, 143, 188, 0.45);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.her-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 13px 24px rgba(255, 143, 188, 0.55);
  filter: brightness(1.03);
}

.her-btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.her-btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: #cc3c76;
  box-shadow: 0 4px 10px rgba(255, 143, 188, 0.25);
}

.her-btn-chip {
  padding: 5px 11px;
  font-size: 0.78rem;
  background: rgba(255,255,255,0.85);
  border-radius: 999px;
  border: 1px solid var(--her-border-soft);
  color: #b1366d;
  cursor: pointer;
  margin-right: 5px;
  margin-bottom: 6px;
  transition: background 0.12s ease, color 0.12s ease;
}

.her-btn-chip.active {
  background: #ff7fb0;
  color: white;
}

/* Love Metrics Chart */
#loveMetricsChart {
  width: 100%;
  max-height: 260px;
}

.her-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.her-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--her-text-soft);
}

/* Snapshot */
#today-snapshot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  font-size: 0.85rem;
}

.her-pill {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.her-pill-positive {
  background: rgba(75, 222, 151, 0.13);
  color: #188357;
}

.her-pill-neutral {
  background: rgba(255, 215, 128, 0.22);
  color: #9c6b1a;
}

.her-pill-negative {
  background: rgba(255, 140, 148, 0.18);
  color: #b42138;
}

/* Daily Table */
#daily-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

#daily-table thead {
  background: rgba(255, 247, 252, 0.9);
}

#daily-table th,
#daily-table td {
  padding: 7px 6px;
  text-align: left;
  border-bottom: 1px solid rgba(247, 197, 219, 0.6);
  white-space: nowrap;
}

#daily-table tbody tr {
  cursor: pointer;
  transition: background 0.12s ease;
}

#daily-table tbody tr:hover {
  background: rgba(255, 224, 239, 0.55);
}

#daily-table tbody tr.selected {
  background: rgba(255, 181, 215, 0.72);
}

.her-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 5px;
}

.her-status-positive { background: #2ac58c; }
.her-status-neutral { background: #f0c44f; }
.her-status-negative { background: #f0647b; }

/* Editor */
.her-field-group {
  margin-bottom: 10px;
}

.her-field-label {
  display: block;
  font-size: 0.78rem;
  margin-bottom: 4px;
  color: var(--her-text-soft);
}

.her-input,
.her-textarea,
.her-select {
  width: 100%;
  padding: 7px 9px;
  font-size: 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 173, 208, 0.9);
  outline: none;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.9);
}

.her-textarea {
  min-height: 74px;
  border-radius: 14px;
  resize: vertical;
}

.her-notes-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 6px;
}

.her-note-row {
  display: flex;
  gap: 6px;
}

.her-note-row input {
  flex: 1;
}

.her-note-remove {
  border-radius: 999px;
  border: none;
  background: rgba(245, 102, 138, 0.1);
  cursor: pointer;
  padding: 0 9px;
  font-size: 0.9rem;
  color: #c5305e;
}

/* Chat */
#her-chat-wrapper {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 8px;
}

.her-chat-bubble {
  max-width: 82%;
  padding: 7px 10px;
  border-radius: 16px;
  font-size: 0.87rem;
  margin-bottom: 6px;
  word-wrap: break-word;
}

.her-chat-user {
  background: #ff9bc2;
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.her-chat-assistant {
  background: #ffffff;
  color: #3b2f3b;
  margin-right: auto;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255, 183, 214, 0.7);
}

.her-chat-input-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

#her-chat-input {
  flex: 1;
}

/* Deep report */
#deep-report-output {
  max-height: 260px;
  overflow-y: auto;
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px dashed rgba(255, 173, 208, 0.9);
  font-size: 0.85rem;
  white-space: pre-wrap;
}

/* Calendar mood grid */
#her-calendar-card {
  padding-top: 20px;
}

.her-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.her-calendar-month {
  font-weight: 600;
}

.her-calendar-nav-btn {
  background: rgba(255,255,255,0.9);
  border-radius: 999px;
  border: 1px solid rgba(255, 173, 208, 0.9);
  cursor: pointer;
  padding: 2px 8px;
  font-size: 0.75rem;
}

#her-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  font-size: 0.75rem;
}

.her-calendar-weekday {
  text-align: center;
  padding: 4px 0;
  color: var(--her-text-soft);
}

.her-calendar-cell {
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(245, 190, 214, 0.7);
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 3px;
  cursor: pointer;
  transition: box-shadow 0.12s ease, transform 0.12s ease, background 0.12s ease;
}

.her-calendar-cell-empty {
  border: none;
  background: transparent;
  cursor: default;
}

.her-calendar-cell-day {
  font-size: 0.7rem;
}

.her-calendar-cell-emoji {
  font-size: 0.9rem;
}

.her-calendar-cell.has-data {
  box-shadow: 0 3px 10px rgba(255, 143, 188, 0.25);
}

.her-calendar-cell-selected {
  background: #ff7fb0;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 143, 188, 0.6);
}

.her-calendar-cell-positive {
  border-color: rgba(83, 208, 150, 0.8);
}

.her-calendar-cell-neutral {
  border-color: rgba(235, 190, 92, 0.8);
}

.her-calendar-cell-negative {
  border-color: rgba(241, 111, 130, 0.9);
}

/* Compare charts */
#her-compare-card .her-field-group {
  margin-bottom: 8px;
}

.her-compare-label {
  font-size: 0.8rem;
  margin-bottom: 2px;
  color: var(--her-text-soft);
}

.her-compare-row {
  margin-bottom: 10px;
}

.her-compare-canvas-wrapper {
  width: 100%;
  height: 70px;
}

.her-compare-canvas-wrapper canvas {
  width: 100% !important;
  height: 70px !important;
}

/* Layout - responsive grid for desktop */
@media (min-width: 900px) {
  #her-dashboard-grid {
    display: grid;
    grid-template-columns: 2.2fr 1.4fr;
    gap: 16px;
    align-items: flex-start;
  }

  #her-dashboard-left > .her-card,
  #her-dashboard-right > .her-card {
    margin-bottom: 16px;
  }

  #today-snapshot {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Misc */
.her-small {
  font-size: 0.75rem;
  color: var(--her-text-soft);
}

.her-inline-text {
  font-size: 0.8rem;
  color: var(--her-text-soft);
}

.her-inline-text.error {
  color: #c5305e;
}
