/* Small overrides not worth doing in Tailwind */

::-webkit-scrollbar       { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #11121a; }
::-webkit-scrollbar-thumb { background: #3a3d4d; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #6b6f80; }

/* Fade-in-up animation for dashboard cards */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up {
  opacity: 0;
  animation: fade-in-up 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Subtle pulse for live indicators */
@keyframes soft-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}
.animate-soft-pulse { animation: soft-pulse 2s ease-in-out infinite; }

/* Hide Alpine cloaked elements until Alpine boots */
[x-cloak] { display: none !important; }

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #10b981;
  cursor: pointer;
  border: 3px solid #11121a;
  box-shadow: 0 0 0 1px #10b981, 0 4px 10px rgba(16, 185, 129, 0.3);
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #10b981;
  cursor: pointer;
  border: 3px solid #11121a;
}
input[type="range"] { -webkit-appearance: none; appearance: none; background: transparent; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; background: #1a1c26; border-radius: 3px; }
input[type="range"]::-moz-range-track { height: 6px; background: #1a1c26; border-radius: 3px; }

/* ---------- Custom-styled <select> ----------
   Replaces the OS-native dropdown arrow with a consistent SVG chevron,
   adds breathing room (12px right padding before the arrow), and matches
   the rest of our form-control look. Apply by adding class="select-styled". */
.select-styled {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239da1b1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 14px 14px;
  padding-right: 2.5rem !important;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.select-styled:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
.select-styled:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
.select-styled::-ms-expand { display: none; }
/* Make the dropdown menu itself dark on browsers that respect it */
.select-styled option {
  background: #11121a;
  color: #e9eaef;
  padding: 8px;
}

/* Small detail: smoother scroll for inline anchor jumps inside the admin panel */
html { scroll-behavior: smooth; }

/* ============================================================
   TIER VISUAL HIERARCHY — Starter → Standard → Pro → Max
   Each tier gets a richer treatment so the customer feels their
   plan's value at a glance. Keyed by lowercase tier name.
   ============================================================ */

/* ---- TIER BADGE (small inline pill) ---- */
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid;
  white-space: nowrap;
}

.tier-badge--starter {
  background: rgba(157, 161, 177, 0.1);
  color: #cdcfd9;
  border-color: rgba(157, 161, 177, 0.3);
}
.tier-badge--standard {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}
.tier-badge--pro {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(167, 139, 250, 0.18));
  color: #67e8f9;
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.15);
}
.tier-badge--max {
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #fbbf24);
  background-size: 200% 200%;
  color: #0a0a0f;
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.4);
  animation: tier-max-shimmer 3s ease-in-out infinite;
  font-weight: 700;
}

/* ---- TIER NAME (used in hero / large displays) ---- */
.tier-name {
  font-weight: 800;
  letter-spacing: -0.025em;
}
.tier-name--starter { color: #cdcfd9; }
.tier-name--standard {
  background: linear-gradient(135deg, #34d399, #10b981);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.tier-name--pro {
  background: linear-gradient(135deg, #22d3ee, #a78bfa, #22d3ee);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: tier-pro-shimmer 5s ease-in-out infinite;
}
.tier-name--max {
  background: linear-gradient(135deg, #fde68a 0%, #fbbf24 25%, #f59e0b 50%, #fbbf24 75%, #fde68a 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: tier-max-shimmer 3s ease-in-out infinite;
  text-shadow: 0 0 30px rgba(251, 191, 36, 0.4);
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.3));
}

/* ---- TIER CARD (subscription panel borders / hero accents) ---- */
.tier-card--starter {
  border-color: rgba(157, 161, 177, 0.3);
  background: linear-gradient(135deg, rgba(157, 161, 177, 0.04), transparent);
}
.tier-card--standard {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), transparent);
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.08);
}
.tier-card--pro {
  border-color: rgba(34, 211, 238, 0.4);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(167, 139, 250, 0.05), transparent);
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.12);
}
.tier-card--max {
  border-color: rgba(251, 191, 36, 0.5);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.04), transparent);
  box-shadow: 0 0 40px rgba(251, 191, 36, 0.18), inset 0 0 1px rgba(251, 191, 36, 0.3);
  position: relative;
}
/* Sparkle dots scattered on Max */
.tier-card--max::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(251, 191, 36, 0.6) 0.5px, transparent 1px),
    radial-gradient(circle at 88% 32%, rgba(253, 230, 138, 0.5) 0.5px, transparent 1px),
    radial-gradient(circle at 65% 78%, rgba(251, 191, 36, 0.5) 0.5px, transparent 1px),
    radial-gradient(circle at 32% 88%, rgba(253, 230, 138, 0.4) 0.5px, transparent 1px);
  pointer-events: none;
  opacity: 0.7;
  animation: tier-max-sparkle 4s ease-in-out infinite;
}

/* ---- TIER HERO BG (big dashboard hero gradient) ---- */
.tier-hero {
  position: relative;
  overflow: hidden;
}
.tier-hero--starter {
  background: linear-gradient(135deg, rgba(157, 161, 177, 0.08), rgba(26, 28, 38, 1));
  border-color: rgba(157, 161, 177, 0.25);
}
.tier-hero--standard {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(26, 28, 38, 1));
  border-color: rgba(16, 185, 129, 0.3);
}
.tier-hero--pro {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(167, 139, 250, 0.08), rgba(26, 28, 38, 1));
  border-color: rgba(34, 211, 238, 0.4);
}
.tier-hero--max {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(245, 158, 11, 0.08), rgba(26, 28, 38, 1));
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: inset 0 0 80px rgba(251, 191, 36, 0.06);
}

/* ---- TIER ICON CHIP (round icon container) ---- */
.tier-chip {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  border: 1px solid;
}
.tier-chip--starter {
  background: rgba(157, 161, 177, 0.1);
  color: #cdcfd9;
  border-color: rgba(157, 161, 177, 0.2);
}
.tier-chip--standard {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(16, 185, 129, 0.1));
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}
.tier-chip--pro {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.3), rgba(167, 139, 250, 0.2));
  color: #67e8f9;
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 4px 16px rgba(34, 211, 238, 0.2);
}
.tier-chip--max {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #0a0a0f;
  border-color: #fbbf24;
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: tier-max-glow 2.5s ease-in-out infinite;
}

/* ---- Animations ---- */
@keyframes tier-max-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes tier-pro-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes tier-max-glow {
  0%, 100% { box-shadow: 0 4px 20px rgba(251, 191, 36, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
  50%      { box-shadow: 0 4px 28px rgba(251, 191, 36, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
}
@keyframes tier-max-sparkle {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.9; }
}
