/* ============================================================
 * TIER 12 — App Store Polish
 * Prefix: t12-
 * ============================================================ */

/* ============ DISCOVER BUTTON ============ */
.t12-discover-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(76,154,255,0.12) 0%, rgba(54,179,126,0.08) 100%);
  border: 1px solid rgba(76,154,255,0.2);
  border-radius: var(--radius);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s, background 0.15s;
  font-family: var(--font);
}
.t12-discover-btn:active {
  transform: scale(0.98);
  background: linear-gradient(135deg, rgba(76,154,255,0.18) 0%, rgba(54,179,126,0.14) 100%);
}
.t12-discover-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.t12-discover-text {
  flex: 1;
  text-align: left;
}
.t12-discover-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}
.t12-discover-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 1px;
}
.t12-discover-badge {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 10px;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}
.t12-discover-chevron {
  font-size: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ============ DISCOVER OVERLAY ============ */
.t12-discover-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,14,26,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  display: none;
  flex-direction: column;
  animation: t12-fadeIn 0.2s ease-out;
}
.t12-discover-overlay.t12-open {
  display: flex;
}
@keyframes t12-fadeIn { from { opacity: 0; } to { opacity: 1; } }

.t12-discover-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.t12-discover-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.t12-discover-close:active { transform: scale(0.95); }
.t12-discover-htitle {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}
.t12-discover-hbadge {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 10px;
}

.t12-discover-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
}

/* Category */
.t12-cat {
  margin-bottom: 20px;
}
.t12-cat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.t12-cat-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.t12-cat-name {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  flex: 1;
}
.t12-cat-count {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.t12-cat-chevron {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.t12-cat.t12-collapsed .t12-cat-chevron {
  transform: rotate(-90deg);
}
.t12-cat.t12-collapsed .t12-cat-list {
  display: none;
}

/* Feature items */
.t12-feat {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  margin-bottom: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, transform 0.1s;
}
.t12-feat:active {
  background: var(--bg-card-hover);
  transform: scale(0.98);
}
.t12-feat-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}
.t12-feat-info {
  flex: 1;
  min-width: 0;
}
.t12-feat-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.t12-feat-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.4;
}
.t12-feat-tier {
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  align-self: center;
  font-weight: 600;
}

/* ============ WHAT'S NEW BANNER ============ */
.t12-whatsnew {
  display: none;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(54,179,126,0.1) 0%, rgba(76,154,255,0.08) 100%);
  border: 1px solid rgba(54,179,126,0.2);
  border-radius: var(--radius);
  overflow: hidden;
  animation: t12-slideDown 0.3s ease-out;
}
@keyframes t12-slideDown {
  from { opacity: 0; transform: translateY(-8px); max-height: 0; }
  to { opacity: 1; transform: translateY(0); max-height: 300px; }
}
.t12-whatsnew.t12-visible { display: block; }

.t12-whatsnew-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.t12-whatsnew-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.t12-whatsnew-title {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.t12-whatsnew-ver {
  font-size: 11px;
  color: var(--green);
  font-weight: 700;
  background: rgba(54,179,126,0.12);
  padding: 2px 8px;
  border-radius: 8px;
}
.t12-whatsnew-close {
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.t12-whatsnew-close:active { background: rgba(255,255,255,0.05); }

.t12-whatsnew-body {
  display: none;
  padding: 0 14px 14px;
}
.t12-whatsnew.t12-expanded .t12-whatsnew-body { display: block; }

.t12-whatsnew-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.t12-whatsnew-list li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
  line-height: 1.4;
}
.t12-whatsnew-list li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.t12-whatsnew-expand {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  -webkit-tap-highlight-color: transparent;
}

/* ============ STATS DASHBOARD ============ */
.t12-stats {
  margin-bottom: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.t12-stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.t12-stats-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
}
.t12-stats-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  letter-spacing: 0.3px;
}
.t12-stats-badge.t12-newbie {
  background: rgba(139,143,163,0.15);
  color: var(--text-secondary);
}
.t12-stats-badge.t12-explorer {
  background: rgba(76,154,255,0.15);
  color: var(--accent);
}
.t12-stats-badge.t12-power {
  background: rgba(54,179,126,0.15);
  color: var(--green);
}

.t12-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.t12-stat-item {
  text-align: center;
  padding: 8px 4px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
}
.t12-stat-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.t12-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* ============ RATING PROMPT ============ */
.t12-rate {
  display: none;
  margin-bottom: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  animation: t12-slideDown 0.3s ease-out;
}
.t12-rate.t12-visible { display: block; }

.t12-rate-content {
  display: flex;
  align-items: center;
  gap: 12px;
}
.t12-rate-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.t12-rate-text {
  flex: 1;
}
.t12-rate-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.t12-rate-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.t12-rate-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.t12-rate-btn {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s;
}
.t12-rate-btn:active { transform: scale(0.96); }
.t12-rate-btn.t12-primary {
  background: var(--accent);
  color: #fff;
  flex: 1;
}
.t12-rate-btn.t12-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.t12-rate-btn.t12-dismiss {
  background: none;
  color: var(--text-muted);
  font-size: 12px;
  padding: 8px 8px;
}

/* ============ ENHANCED ONBOARDING ============ */
.t12-onboard-step-indicator {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 12px;
}
.t12-onboard-illustration {
  font-size: 56px;
  margin-bottom: 20px;
  display: block;
  line-height: 1;
}

/* ============ FEATURE SEARCH ============ */
.t12-search-wrap {
  position: relative;
  margin-bottom: 16px;
}
.t12-search-input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  font-weight: 500;
  background: var(--bg-card);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.t12-search-input:focus {
  border-color: var(--accent);
}
.t12-search-input::placeholder {
  color: var(--text-muted);
}
.t12-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-muted);
  pointer-events: none;
}
.t12-no-results {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 14px;
}
.t12-no-results-icon {
  font-size: 32px;
  margin-bottom: 8px;
  display: block;
}
