/* ==========================================================================
   UI Components: Buttons, Theme Toggle, Media Frames, Interactive Widget & FAQ
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    transform 0.2s var(--reveal-ease),
    background-color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--ink-primary);
  border-color: var(--border-hairline);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  border-color: var(--accent-border);
  background: var(--bg-chip);
}

.btn-sm {
  min-height: 36px;
  padding: 0 15px;
  font-size: 0.85rem;
}

/* Theme Switcher Button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  color: var(--ink-primary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--accent-border);
}

/* Pill Tags */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-secondary);
}

.tag-pill--accent {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* Media Screenshot Frame */
.media-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-media);
  background: var(--bg-surface-elevated);
}

.media-frame img {
  width: 100%;
  transition: filter 0.3s ease;
}

.media-frame:hover img {
  filter: brightness(1.03);
}

.media-frame--bare {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.media-frame--bare img {
  filter: drop-shadow(0 20px 38px rgba(0, 0, 0, 0.42));
}

.media-frame--bare:hover img {
  filter: drop-shadow(0 22px 42px rgba(0, 0, 0, 0.48)) brightness(1.03);
}

.media-frame--widget img {
  border-radius: 34px;
}

.media-frame--dial img {
  border-radius: 26px;
}

.media-frame--transparent img {
  border-radius: 0;
  filter: drop-shadow(0 20px 38px rgba(0, 0, 0, 0.32));
}

/* Theme-Aware Image Switching */
[data-theme="dark"] .theme-img--light {
  display: none;
}

[data-theme="light"] .theme-img--dark {
  display: none;
}

/* Footer Badges */
.footer-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.footer-badge-link {
  display: inline-flex;
  align-items: center;
  height: 52px;
  border-radius: 11px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #14161f;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.2s var(--reveal-ease), opacity 0.2s ease;
}

.footer-badge-link--dark {
  background: #14161f;
  border-color: #2d3142;
  color: #ffffff;
}

.footer-badge-link:hover {
  transform: translateY(-2px);
  opacity: 0.94;
}

.footer-badge-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 100%;
  border-right: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.footer-badge-link--dark .footer-badge-icon {
  border-right-color: #2d3142;
}

.footer-badge-text {
  display: flex;
  flex-direction: column;
  padding: 0 14px 0 12px;
  line-height: 1.15;
}

.footer-badge-kicker {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8b92a1;
}

.footer-badge-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* 56x56 Icon Tile (Woday #2) */
.icon-tile {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
}

/* Theme Swatch Row (Matches Theme.swift AccentPreset) */
.accent-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.accent-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  color: var(--ink-secondary);
}

.accent-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Interactive Quick Capture Widget Demo (Faithful to FloatingWidgetView + QuickInputParser) */
.capture-demo {
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.capture-demo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.capture-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-chip);
  border: 1px solid var(--border-hairline);
  transition: border-color 0.2s ease;
}

.capture-input-wrap:focus-within {
  border-color: var(--accent);
}

.capture-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink-primary);
  font-size: 0.94rem;
  outline: none;
}

.capture-input::placeholder {
  color: var(--ink-muted);
}

.capture-submit {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.capture-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.preset-btn {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hairline);
  background: var(--bg-chip);
  color: var(--ink-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.preset-btn:hover,
.preset-btn[aria-pressed="true"] {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
}

.capture-preview {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
}

.capture-preview-title {
  font-weight: 600;
  color: var(--ink-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capture-preview-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  white-space: nowrap;
}

/* Feature Bullet List with Top Hairlines (#4) */
.feature-list {
  display: grid;
  gap: 20px;
  margin-top: 26px;
}

.feature-list-item {
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.feature-list-item h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

/* Keyboard Shortcut Strip (FullScreenAlertView.swift) */
.shortcut-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* FAQ Accordion (#2) */
.faq-list {
  max-width: 780px;
  margin: 36px auto 0;
  display: grid;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  overflow: hidden;
}

.faq-trigger {
  width: 100%;
  padding: 18px 22px;
  border: 0;
  background: transparent;
  color: var(--ink-primary);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}

.faq-chevron {
  transition: transform 0.25s ease;
  color: var(--ink-muted);
  flex-shrink: 0;
}

.faq-trigger[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq-panel {
  padding: 0 22px 18px;
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--ink-secondary);
}

.faq-panel[hidden] {
  display: none;
}
