/*
 * Theme: theme-Serenity
 * Author: Serenity
 * Build: 2026-06-03 10:28:07
 * Fingerprint: 18f8d0015be24d2b
 * Copyright (c) 2026 Serenity. All rights reserved.
 */

.page-header {
  margin-bottom: var(--space-4);
  padding-top: calc(var(--header-height) + var(--space-8));
  text-align: center;
}

/* Days counter */
.wish-days-badge {
  text-align: center;
  margin-bottom: var(--space-4);
  font-size: 14px;
  color: var(--color-text-muted);
}
.wish-days-badge .num {
  font-weight: 700;
  font-size: 20px;
  color: var(--color-accent);
  margin: 0 3px;
}
.wish-days-badge .name {
  font-weight: 600;
  color: var(--color-accent);
}

/* Tabs */
.wish-tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}
.wish-tab {
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border);
  font-family: inherit;
  transition: all 0.2s;
}
.wish-tab:hover { color: var(--color-text); background: var(--color-bg-soft); }
.wish-tab.active {
  color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
  border-color: color-mix(in srgb, var(--color-accent) 30%, transparent);
}

/* Board — full viewport width, break out of .container */
.wish-board {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: calc(100vh - var(--header-height, 64px) - 260px);
  min-height: 400px;
  overflow: visible;
}
/* Prevent horizontal scrollbar from card overflow */
.main:has(.wish-board) { overflow-x: clip; }

/* Card — absolute positioned, scattered by JS */
.wish-card {
  --card-w: 230px;
  position: absolute;
  width: var(--card-w);
  border-radius: var(--radius-lg, 14px);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 8px 28px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  transform-origin: center;
  transition: transform 0.35s cubic-bezier(0.25,0.8,0.25,1),
              box-shadow 0.35s ease,
              opacity 0.4s ease;
  cursor: default;
  opacity: 0;
}
.wish-card:hover {
  box-shadow: 0 14px 40px rgba(0,0,0,0.18), 0 4px 12px rgba(0,0,0,0.08);
  z-index: 9000 !important;
}
.wish-card.dragging {
  transition: none;
  box-shadow: 0 22px 50px rgba(0,0,0,0.25), 0 6px 16px rgba(0,0,0,0.12);
  z-index: 10000 !important;
  cursor: grabbing;
}

@keyframes wishCardIn {
  from { opacity: 0; transform: scale(0.85) rotate(0deg); }
  to   { opacity: 1; transform: scale(1); }
}

/* Card header - macOS dots */
.wish-card-header {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255,255,255,0.3);
  cursor: grab;
  user-select: none;
}
.wish-card.dragging .wish-card-header { cursor: grabbing; }
.wish-dots { display: flex; gap: 5px; }
.wish-dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.08); }
.wish-dot.red { background: #ff5f57; border-color: #e0443e; }
.wish-dot.yellow { background: #febb2e; border-color: #dea123; }
.wish-dot.green { background: #28c840; border-color: #1aab2c; }
.wish-card-label {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: rgba(0,0,0,0.35);
}

/* Card body */
.wish-card-body {
  padding: 14px 16px 10px;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(0,0,0,0.72);
  word-break: break-word;
}

/* Card color variables for status tags */
.wish-card[data-color="green"]  { --tag-bg: rgba(76,175,80,0.18); --tag-color: #2e7d32; --tag-dot: #43a047; }
.wish-card[data-color="yellow"] { --tag-bg: rgba(255,193,7,0.22); --tag-color: #f57f17; --tag-dot: #f9a825; }
.wish-card[data-color="purple"] { --tag-bg: rgba(156,39,176,0.15); --tag-color: #7b1fa2; --tag-dot: #9c27b0; }
.wish-card[data-color="pink"]   { --tag-bg: rgba(233,30,99,0.15); --tag-color: #c2185b; --tag-dot: #e91e63; }
.wish-card[data-color="blue"]   { --tag-bg: rgba(33,150,243,0.18); --tag-color: #1565c0; --tag-dot: #1e88e5; }
.wish-card[data-color="orange"] { --tag-bg: rgba(255,152,0,0.20); --tag-color: #e65100; --tag-dot: #f57c00; }

/* Status text (italic, inline after content) */
.wish-status-text {
  font-style: italic;
  font-size: 13px;
  font-weight: 500;
  margin-left: 6px;
  color: var(--tag-color, #2e7d32);
  opacity: 0.78;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* AI reply */
.wish-card-ai {
  margin: 6px 16px 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.05);
  font-size: 12px;
  color: rgba(0,0,0,0.55);
  font-style: italic;
  line-height: 1.55;
}
.wish-card-ai::before {
  content: 'AI ';
  font-style: normal;
  font-weight: 700;
  color: #c4856a;
  font-size: 10px;
}

/* Done extras */
.wish-card-done-img {
  width: calc(100% - 32px);
  margin: 6px 16px 0;
  border-radius: 8px;
  max-height: 140px;
  object-fit: cover;
}
.wish-card-done-note {
  margin: 4px 16px 8px;
  font-size: 12px;
  color: rgba(0,0,0,0.55);
  font-style: italic;
}

/* Card footer */
.wish-card-footer {
  padding: 0 16px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: rgba(0,0,0,0.4);
}
.wish-card-nick { font-weight: 500; color: rgba(0,0,0,0.6); }

/* Card colors */
.wish-card[data-color="green"]  { background: rgb(217,242,217); }
.wish-card[data-color="yellow"] { background: rgb(249,247,217); }
.wish-card[data-color="purple"] { background: rgb(229,215,255); }
.wish-card[data-color="pink"]   { background: rgb(255,224,227); }
.wish-card[data-color="blue"]   { background: rgb(199,240,255); }
.wish-card[data-color="orange"] { background: rgb(255,216,168); }
.wish-card { background: rgb(217,242,217); }

/* Plugin not installed */
.wish-empty-page {
  text-align: center;
  padding: 80px 20px;
  color: var(--color-text-muted);
}
.wish-empty-page svg { display: block; margin: 0 auto 1rem; opacity: 0.4; }
.wish-empty-page p { font-size: 15px; }

/* Empty state */
.wish-empty {
  position: relative;
  text-align: center;
  color: var(--color-text-muted);
  pointer-events: none;
  padding: 80px 32px;
  margin: 0 auto;
  max-width: 500px;
}
.wish-board:has(.wish-empty) {
  height: auto;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wish-empty svg { display: block; margin: 0 auto 1rem; opacity: 0.4; }
.wish-empty p { font-size: 15px; }

/* === Input bar === */
.wish-input-bar {
  position: fixed;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-lg, 18px);
  background: color-mix(in srgb, var(--color-bg) 85%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  z-index: 100;
  max-width: 700px;
  width: calc(100% - 32px);
  transition: box-shadow 0.3s;
}
.wish-input-bar:focus-within {
  box-shadow: 0 6px 28px rgba(0,0,0,0.12);
}

.wish-input-nick {
  width: 72px;
  flex-shrink: 0;
  font-size: 13px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 12px);
  outline: none;
  background: var(--color-bg-soft);
  color: var(--color-text);
  font-family: inherit;
  transition: border-color 0.2s;
}
.wish-input-nick:focus { border-color: var(--color-accent); }

.wish-input-content {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 12px);
  outline: none;
  background: var(--color-bg-soft);
  color: var(--color-text);
  font-family: inherit;
  transition: border-color 0.2s;
}
.wish-input-content:focus { border-color: var(--color-accent); }

.wish-char-counter {
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.wish-char-counter.over { color: #e53e3e; font-weight: 600; }

.wish-colors {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.wish-color-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  opacity: 0.6;
}
.wish-color-dot:hover, .wish-color-dot.active {
  opacity: 1;
  border-color: rgba(0,0,0,0.2);
  transform: scale(1.15);
}

.wish-type-btn {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--color-border);
  background: var(--color-bg-soft);
  color: var(--color-text-muted);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}
.wish-type-btn:hover { background: var(--color-bg-mute); }

.wish-btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-md, 12px);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s;
}
.wish-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.wish-btn-submit {
  background: var(--color-accent);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--color-accent) 30%, transparent);
}
.wish-btn-submit:hover:not(:disabled) { opacity: 0.85; transform: translateY(-1px); }
.wish-btn-polish {
  background: rgba(180,152,208,0.7);
}
.wish-btn-polish:hover:not(:disabled) { background: rgba(180,152,208,0.9); }

/* Toast */
.wish-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(44,44,44,0.88);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 8px 20px;
  border-radius: var(--radius-lg, 12px);
  font-size: 13px;
  z-index: 200;
  opacity: 0;
  transition: all 0.35s;
  pointer-events: none;
}
.wish-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* === Responsive === */
@media (max-width: 768px) {
  .wish-board {
    height: calc(100vh - var(--header-height, 64px) - 200px);
    min-height: 280px;
    overflow: hidden;
  }
  .wish-card { --card-w: 150px; }
  .wish-card-body { font-size: 12px; padding: 8px 10px 6px; line-height: 1.5; }
  .wish-card-header { padding: 6px 8px; }
  .wish-dots { gap: 3px; }
  .wish-dot { width: 7px; height: 7px; }
  .wish-card-label { font-size: 9px; }
  .wish-card-footer { padding: 0 10px 8px; font-size: 9px; }
  .wish-card-ai { margin: 4px 10px 8px; font-size: 11px; }
  .wish-status-text { font-size: 11px; }
  .wish-card-done-img { width: calc(100% - 20px); margin: 4px 10px 0; max-height: 80px; }
  .wish-card-done-note { margin: 3px 10px 6px; font-size: 11px; }
  .wish-days-badge { font-size: 12px; }
  .wish-days-badge .num { font-size: 16px; }
  .wish-input-bar {
    bottom: 8px;
    left: 8px;
    right: 8px;
    width: auto;
    transform: none;
    padding: 8px;
    gap: 6px;
    flex-wrap: wrap;
    max-width: none;
  }
  .wish-input-nick { width: 48px; font-size: 11px; padding: 6px 6px; }
  .wish-input-content { font-size: 11px; padding: 6px 8px; min-width: 0; }
  .wish-char-counter { font-size: 10px; }
  .wish-colors { order: 10; width: 100%; justify-content: center; padding-top: 2px; }
  .wish-color-dot { width: 14px; height: 14px; }
  .wish-btn { padding: 6px 10px; font-size: 11px; }
  .wish-type-btn { font-size: 10px; padding: 4px 6px; }
  .wish-btn-polish { display: none; }
}

@media (max-width: 480px) {
  .wish-card { --card-w: 120px; }
  .wish-card-body { font-size: 11px; padding: 6px 8px 4px; }
  .wish-card-header { padding: 5px 6px; }
  .wish-dots { gap: 2px; }
  .wish-dot { width: 6px; height: 6px; }
  .wish-card-label { font-size: 8px; }
  .wish-card-footer { padding: 0 8px 6px; font-size: 8px; }
  .wish-card-ai { margin: 3px 8px 6px; font-size: 10px; }
  .wish-status-text { font-size: 10px; }
  .wish-card-done-img { max-height: 60px; }
}
