/* ============================================================
   base.css — Influboard Global Base
   Loaded on EVERY page. Contains only:
   - Reset
   - CSS variables (colours, etc.)
   - Base html/body styles
   - Shared utility classes used across multiple pages
   ============================================================ */

/* ── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── CSS VARIABLES ─────────────────────────────────────────── */
:root {
  --purple:        #7C6EFA;
  --purple-hover:  #6A5DF0;
  --purple-light:  #F0EFFE;
  --purple-dark:   #4A3DC4;
  --text-dark:     #1A1D23;
  --text-mid:      #6B7280;
  --text-light:    #9CA3AF;
  --border:        #EAECF0;
  --bg-page:       #F8F9FC;
  --bg-card:       #ffffff;
  --bg-input:      #F3F4F8;
  --success:       #10b981;
  --error:         #EF4444;
  --error-light:   #FEF2F2;
}

/* ── BASE ──────────────────────────────────────────────────── */
html, body {
  height: 100%;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  color: var(--text-dark);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

/* ── SHARED UTILITIES ──────────────────────────────────────── 
   These classes appear on login, billing, campaigns etc.
   Any class used on 2+ pages lives here, not in a page file.
   ─────────────────────────────────────────────────────────── */

/* Inline error message below form fields */
.field-error {
  font-size: 13px;
  color: var(--error);
  font-weight: 600;
  min-height: 16px;
  display: block;
}

/* OR divider line between two options e.g. Google / email */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider span {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* Form field wrapper — label + input + error stacked vertically */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
}

.field-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  color: var(--text-dark);
  background: var(--bg-card);
  outline: none;
  transition: border 0.15s ease, box-shadow 0.15s ease;
}

.field-group input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124,110,250,0.12);
}

.field-group input:hover:not(:focus) {
  border-color: var(--text-light);
}

.field-group input::placeholder {
  color: var(--text-light);
  font-weight: 400;
}

.field-group input.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

/* Password input wrapper — positions eye button inside input */
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon input {
  padding-right: 42px;
}

/* Eye toggle button — browser defaults fully reset */
.eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  outline: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
  line-height: 0;
}

.eye-btn:hover {
  color: var(--text-dark);
}

/* Fade in animation — used by password rules, tooltips, dropdowns */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ════════════════════════════════════════════════════════════
   SHARED BUTTON UTILITIES
   Used on payments, billing, campaigns and any future page
   that needs a generic CTA button.
   ──────────────────────────────────────────────────────────── */

/* Primary CTA — solid purple with shadow, the main action */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  background: var(--purple);
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(124,110,250,0.3);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--purple-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124,110,250,0.4);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(124,110,250,0.3);
}

.btn-primary:disabled {
  background: var(--text-light);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
  opacity: 0.6;
}

/* Modifier — full width button (typical inside cards) */
.btn-primary.btn-block,
.btn-secondary.btn-block {
  width: 100%;
}


/* Secondary CTA — white background, grey border, lower priority */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dark);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: var(--bg-input);
  border-color: var(--text-light);
}

.btn-secondary:active {
  background: var(--border);
}

.btn-secondary:disabled {
  color: var(--text-light);
  cursor: not-allowed;
  opacity: 0.6;
}


/* ════════════════════════════════════════════════════════════
   PILL TOGGLE
   Two-or-more option switcher e.g. Monthly / Yearly,
   All / Active / Completed, etc.
   Usage:
     <div class="pill-toggle">
       <button class="active">Monthly</button>
       <button>Yearly</button>
     </div>
   ──────────────────────────────────────────────────────────── */

.pill-toggle {
  display: inline-flex;
  background: var(--bg-input);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}

.pill-toggle button {
  padding: 8px 18px;
  border-radius: 7px;
  border: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
  color: var(--text-light);
  white-space: nowrap;
}

.pill-toggle button.active {
  background: #ffffff;
  color: var(--text-dark);
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

.pill-toggle button:hover:not(.active) {
  color: var(--text-dark);
}


/* ════════════════════════════════════════════════════════════
   BADGE
   Small pill label — used for "POPULAR", "Active", "Trial" etc.
   Default = purple. Color variants via modifier classes.
   Usage:
     <span class="badge">Default</span>
     <span class="badge purple">Popular</span>
     <span class="badge green">Active</span>
     <span class="badge amber">Trial</span>
     <span class="badge red">Expired</span>
   ──────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--purple-light);
  color: var(--purple);
  white-space: nowrap;
}

.badge.purple {
  background: var(--purple-light);
  color: var(--purple);
}

.badge.green {
  background: #ECFDF5;
  color: #059669;
}

.badge.amber {
  background: #FEF3C7;
  color: #D97706;
}

.badge.red {
  background: var(--error-light);
  color: var(--error);
}