/**
 * OceanWeep Referral Plugin — dashboard.css
 *
 * Self-contained component styles for the referral dashboard.
 * Uses the same CSS custom properties as the OceanWeep theme.
 * Loads on every page where the plugin renders — no theme dependency.
 */

/* ── CSS VARIABLES (dark default, light override) ── */
:root {
  --ocean-1: #020b18;
  --ocean-2: #041422;
  --ocean-3: #071c30;
  --ocean-4: #0a2540;
  --accent: #0ea5e9;
  --accent-bright: #38bdf8;
  --accent-glow: rgba(14,165,233,0.28);
  --accent-pale: rgba(14,165,233,0.08);
  --accent-border: rgba(56,189,248,0.2);
  --teal: #14b8a6;
  --teal-pale: rgba(20,184,166,0.12);
  --purple: #a855f7;
  --green: #22c55e;
  --red: #f43f5e;
  --gold: #f59e0b;

  --bg: var(--ocean-1);
  --surface: var(--ocean-2);
  --surface2: var(--ocean-3);
  --surface3: var(--ocean-4);
  --border: rgba(255,255,255,0.06);
  --text: #e8f4fd;
  --text-2: #7fb3d3;
  --text-3: #3d6b8a;

  --font: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
  --shadow: 0 8px 32px rgba(0,0,0,0.6);
  --shadow-lg: 0 24px 64px rgba(0,0,0,0.7);
  --shadow-blue: 0 8px 32px rgba(14,165,233,0.35);
}

[data-theme="light"] {
  --bg: #f0f8ff;
  --surface: #ffffff;
  --surface2: #e8f4fd;
  --surface3: #d5ebf8;
  --border: rgba(14,165,233,0.12);
  --text: #042840;
  --text-2: #2a6a90;
  --text-3: #7ab5d0;
  --accent-pale: rgba(14,165,233,0.07);
  --accent-border: rgba(14,165,233,0.2);
  --shadow: 0 8px 32px rgba(14,165,233,0.14);
  --shadow-lg: 0 24px 64px rgba(14,165,233,0.18);
}

/* ── BASE ── */
*, *::before, *::after { box-sizing: border-box; }

/* ── PLUGIN COMPONENTS ── */
.btn-primary {
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--accent), #0369a1);
  border: none; border-radius: var(--radius);
  font-family: var(--font); font-weight: 700; font-size: 0.95rem;
  color: #fff; cursor: pointer; text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s; box-shadow: var(--shadow-blue);
  display: inline-flex; align-items: center; gap: 9px;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 48px rgba(14,165,233,0.55); }
.btn-primary svg { width: 18px; height: 18px; fill: white; flex-shrink: 0; }
.pc-task-pill {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.63rem;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-2);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
[data-theme="light"] .pc-task-pill {
  border: 1px solid rgba(14,165,233,0.18);
  color: var(--text-2);
  background: rgba(14,165,233,0.05);
}
.pc-task-pill:hover {
  border-color: var(--accent-border);
  background: var(--accent-pale);
  color: var(--accent-bright);
}

/* SHARE WIDGET */
[data-theme="light"] .earn-reward { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; color: var(--accent-bright); padding: 5px 12px; background: var(--accent-pale); border: 1px solid var(--accent-border); border-radius: 20px; display: inline-block; }

.ct-nav-links { display: flex; gap: 24px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.ct-nav-links a { color: var(--text-2); text-decoration: none; font-size: 0.8rem; font-weight: 600; transition: color 0.2s; white-space: nowrap; }
.ct-nav-links a:hover { color: var(--text); }

.ct-nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(2,11,24,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
[data-theme="light"] .ct-nav { background: rgba(240,248,255,0.95); }

.ct-nav-inner { display: flex; align-items: center; gap: 16px; }
.ct-nav-title { font-size: 1rem; font-weight: 800; letter-spacing: -0.02em; }

.ct-body { max-width: 860px; margin: 0 auto; padding: 52px 28px 80px; }
.ct-header { margin-bottom: 48px; }
.ct-header-label { font-size: 0.72rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent-bright); margin-bottom: 14px; }
.ct-header h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin-bottom: 14px; }
.ct-header p { font-size: 1rem; color: var(--text-2); line-height: 1.7; max-width: 540px; }

.ct-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; }

.ct-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.ct-section-title { font-size: 0.7rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-3); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }

.ct-field { margin-bottom: 20px; }
.ct-label { font-size: 0.8rem; font-weight: 700; color: var(--text-2); margin-bottom: 7px; display: flex; align-items: center; gap: 6px; }
.ct-label-req { color: var(--accent-bright); }
.ct-input {
  width: 100%; padding: 12px 16px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.9rem; color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.ct-input:focus { border-color: var(--accent-border); box-shadow: 0 0 0 3px var(--accent-pale); }
.ct-input::placeholder { color: var(--text-3); }
[data-theme="light"] .ct-input { background: #f0f8ff; }

.ct-sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky; top: 80px;
}
.ct-preview-title { font-size: 0.9rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 16px; }

/* ── REFERRAL LINK BOX (dashboard.php uses these) ── */
.ref-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.ref-link-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  outline: none;
  cursor: text;
}
.ref-link-input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-pale);
}
.ref-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--accent-pale);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-bright);
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
  white-space: nowrap;
  flex-shrink: 0;
}
.ref-copy-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue);
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.ref-copy-btn svg { flex-shrink: 0; }

/* Share via links */
.owr-share-link {
  color: var(--accent-bright);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.2s, text-decoration 0.2s;
  border-bottom: 1px solid transparent;
}
.owr-share-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent-border);
}
