/* ================================================
   Appreciation / support card — modern soft UI
   ================================================ */

:root {
  --ap-gold: #e9a302;
  --ap-amber: #f59e0b;
  --ap-orange: #ea580c;
  --ap-border: rgba(15, 23, 42, 0.08);
  --ap-muted: #64748b;
  --ap-text: #0f172a;
  --ap-sub: #475569;
  --ap-surface: rgba(255, 255, 255, 0.72);
  --ap-surface-solid: #ffffff;
  --ap-elev: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 40px -12px rgba(15, 23, 42, 0.12);
  --ap-radius: 1.25rem;
  --ap-radius-sm: 0.75rem;
}

/* ── Card ── */
.appreciate-card {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--ap-surface);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius);
  overflow: hidden;
  box-shadow: var(--ap-elev);
  position: relative;
}

.appreciate-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

/* ── Header ── */
.appreciate-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 1.5rem 1.2rem;
  border-bottom: 1px solid var(--ap-border);
  background: linear-gradient(165deg, rgba(250, 250, 252, 0.95) 0%, rgba(255, 255, 255, 0.88) 100%);
}

.appreciate-header-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--ap-gold), var(--ap-orange));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow:
    0 2px 8px rgba(234, 88, 12, 0.18),
    0 0 0 2px rgba(255, 255, 255, 0.85) inset;
}
.appreciate-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.appreciate-header-text { flex: 1; min-width: 0; }
.appreciate-header-name {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--ap-text);
  letter-spacing: -0.02em;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.appreciate-header-sub {
  font-size: 0.8125rem;
  color: var(--ap-sub);
  margin-top: 0.2rem;
  font-weight: 500;
  line-height: 1.4;
}

/* ── Body ── */
.appreciate-body {
  padding: 1.5rem 1.5rem 1.65rem;
  background: var(--ap-surface-solid);
}

.appreciate-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ap-sub);
  margin-bottom: 0.55rem;
}

.appreciate-optional {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  color: var(--ap-muted);
}

/* ── Presets ── */
.appreciate-presets {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 520px) {
  .appreciate-presets { grid-template-columns: repeat(3, 1fr); }
}

.appreciate-preset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0.6rem 0.35rem;
  min-height: 3.35rem;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius-sm);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.12s ease,
    box-shadow 0.15s ease;
  outline: none;
}
.appreciate-preset-btn:hover {
  border-color: rgba(245, 158, 11, 0.45);
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}
.appreciate-preset-btn:focus-visible {
  border-color: var(--ap-amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}
.appreciate-preset-btn.active {
  background: linear-gradient(155deg, #fde68a 0%, #fbbf24 55%, #f59e0b 100%);
  border-color: rgba(217, 119, 6, 0.35);
  box-shadow:
    0 6px 20px rgba(245, 158, 11, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transform: translateY(-1px);
}
.appreciate-preset-btn.active .preset-currency,
.appreciate-preset-btn.active .preset-value { color: #78350f; }

.preset-currency {
  font-size: 0.5625rem;
  font-weight: 700;
  color: var(--ap-muted);
  line-height: 1;
  letter-spacing: 0.04em;
}
.preset-value {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ap-text);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ── Custom amount ── */
.appreciate-custom-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius-sm);
  overflow: hidden;
  background: #fafbfc;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.appreciate-custom-wrap:focus-within {
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
  background: #fff;
}
.appreciate-custom-prefix {
  padding: 0 1rem;
  height: 46px;
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ap-sub);
  background: rgba(241, 245, 249, 0.85);
  border-right: 1px solid var(--ap-border);
  flex-shrink: 0;
}
.appreciate-custom-input {
  border: none;
  outline: none;
  padding: 0.7rem 1rem;
  font-size: 0.9375rem;
  width: 100%;
  color: var(--ap-text);
  background: transparent;
  font-weight: 600;
}
.appreciate-custom-input::placeholder { color: #94a3b8; font-weight: 500; }

/* ── Standard text inputs (e.g. blog author tip — guest name / email) ── */
.appreciate-guest-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 768px) {
  .appreciate-guest-grid { grid-template-columns: 1fr 1fr; }
}
.appreciate-std-input {
  width: 100%;
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius-sm);
  padding: 0.7rem 1rem;
  font-size: 0.9375rem;
  color: var(--ap-text);
  background: #fafbfc;
  font-family: inherit;
  font-weight: 500;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.appreciate-std-input:focus {
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
  background: #fff;
  outline: none;
}
.appreciate-std-input::placeholder { color: #94a3b8; font-weight: 500; }
.appreciate-guest-hint {
  font-size: 0.8125rem;
  color: var(--ap-sub);
  line-height: 1.45;
  margin: 0 0 0.75rem;
}

/* ── Textarea ── */
.appreciate-textarea {
  width: 100%;
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--ap-text);
  resize: vertical;
  min-height: 4rem;
  outline: none;
  font-family: inherit;
  line-height: 1.55;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
  background: #fafbfc;
}
.appreciate-textarea:focus {
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
  background: #fff;
}
.appreciate-textarea::placeholder { color: #94a3b8; }

/* ── Phone + anonymous ── */
.appreciate-phone-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.appreciate-phone-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius-sm);
  overflow: hidden;
  flex: 1;
  min-width: 200px;
  background: #fafbfc;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.appreciate-phone-wrap:focus-within {
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
  background: #fff;
}
.appreciate-phone-prefix {
  padding: 0 0.95rem;
  height: 46px;
  display: flex;
  align-items: center;
  color: var(--ap-muted);
  background: rgba(241, 245, 249, 0.85);
  border-right: 1px solid var(--ap-border);
  font-size: 1rem;
  flex-shrink: 0;
}
.appreciate-phone-input {
  border: none;
  outline: none;
  padding: 0.7rem 1rem;
  font-size: 0.875rem;
  width: 100%;
  color: var(--ap-text);
  background: transparent;
  font-weight: 500;
}
.appreciate-phone-input::placeholder { color: #94a3b8; font-weight: 500; }

.appreciate-anon-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  user-select: none;
  padding: 0.35rem 0;
}
.appreciate-anon-check {
  width: 1rem;
  height: 1rem;
  accent-color: var(--ap-orange);
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 4px;
}
.appreciate-anon-text {
  font-size: 0.8125rem;
  color: var(--ap-sub);
  font-weight: 600;
}

/* ── Submit ── */
.appreciate-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 42%, #ea580c 100%);
  color: #0f172a;
  border: none;
  border-radius: var(--ap-radius-sm);
  padding: 0.9rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition:
    filter 0.16s ease,
    transform 0.14s ease,
    box-shadow 0.16s ease;
  box-shadow:
    0 4px 14px rgba(234, 88, 12, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.appreciate-submit-heart { font-size: 1rem; line-height: 1; }
.appreciate-submit-btn:hover {
  filter: brightness(1.03);
  transform: translateY(-2px);
  box-shadow:
    0 10px 28px rgba(234, 88, 12, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.appreciate-submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.22);
}
.appreciate-submit-btn:focus-visible {
  outline: 2px solid #c2410c;
  outline-offset: 2px;
}

/* ── Login prompt ── */
.appreciate-login-prompt {
  text-align: center;
  padding: 2rem 1.5rem;
}
.appreciate-login-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(145deg, #fef3c7, #fde68a);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  color: #d97706;
  margin-bottom: 1rem;
  box-shadow:
    0 6px 20px rgba(245, 158, 11, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.appreciate-login-text {
  font-size: 0.875rem;
  color: var(--ap-sub);
  margin-bottom: 1.15rem;
  line-height: 1.55;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}
.appreciate-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, #fbbf24, #ea580c);
  color: #0f172a !important;
  font-weight: 800;
  font-size: 0.875rem;
  padding: 0.65rem 1.65rem;
  border-radius: 100px;
  text-decoration: none;
  transition:
    filter 0.16s ease,
    transform 0.14s ease,
    box-shadow 0.16s ease;
  box-shadow: 0 4px 16px rgba(234, 88, 12, 0.22);
}
.appreciate-login-btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(234, 88, 12, 0.3);
}

/* ── Recent supporters ── */
.appreciate-recent {
  border-top: 1px solid var(--ap-border);
  padding: 1.1rem 1.5rem 1.35rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}
.appreciate-recent-title {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ap-muted);
  margin-bottom: 0.75rem;
}
.appreciate-recent-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.appreciate-recent-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius-sm);
  padding: 0.6rem 0.85rem;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
  backdrop-filter: blur(8px);
}
.appreciate-recent-item:hover {
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}
.appreciate-recent-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(145deg, #fbbf24, #ea580c);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #0f172a;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.appreciate-recent-info { flex: 1; min-width: 0; }
.appreciate-recent-name {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ap-text);
  line-height: 1.25;
}
.appreciate-recent-msg {
  display: block;
  font-size: 0.72rem;
  color: var(--ap-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
  font-style: italic;
}
.appreciate-recent-amount {
  font-size: 0.75rem;
  font-weight: 800;
  color: #15803d;
  flex-shrink: 0;
  background: rgba(220, 252, 231, 0.85);
  border: 1px solid rgba(74, 222, 128, 0.45);
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
}
