/**
 * MVP789 / Dynamic Brand Admin Dashboard
 * Claymorphism Design System & 3-Button Tactile Engine
 * File: public/admin/css/clay.css
 */

:root {
  /* Canvas & Dark Aggregator Surfaces */
  --bg-dark: #0a0e17;
  --bg-surface: #121824;
  --bg-surface-elevated: #161e2e;
  --bg-surface-card: #141c2c;
  --bg-sunken: #0c101a;
  
  /* Signature 3-Button Color System */
  --clay-primary: #00e676;
  --clay-primary-glow: rgba(0, 230, 118, 0.4);
  --clay-primary-dark: #00964b;
  
  --clay-secondary: #ffaa00;
  --clay-secondary-glow: rgba(255, 170, 0, 0.35);
  --clay-secondary-dark: #b37400;
  
  --clay-danger: #ff3860;
  --clay-danger-glow: rgba(255, 56, 96, 0.4);
  --clay-danger-dark: #b81434;

  /* Neutral Dark Button */
  --clay-neutral: #222d42;
  --clay-neutral-glow: rgba(34, 45, 66, 0.5);

  /* Accents & Text */
  --clay-cyan: #00d2d3;
  --clay-purple: #8b5cf6;
  --clay-text: #f0f4fc;
  --clay-text-muted: #8b99b0;
  --clay-border: rgba(255, 255, 255, 0.06);
  
  /* Curvatures */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-full: 9999px;
}

/* ========================================================
   1. CLAYMORPHIC SURFACES & CARDS
   ======================================================== */
.clay-card {
  background: var(--bg-surface-card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 
    inset 2px 2px 4px rgba(255, 255, 255, 0.06),
    inset -3px -3px 6px rgba(0, 0, 0, 0.6),
    0 16px 32px -8px rgba(0, 0, 0, 0.7);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 24px;
}

.clay-card:hover {
  border-color: rgba(255, 255, 255, 0.08);
}

.clay-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  margin: 20px 0;
}

/* ========================================================
   2. SUNKEN WELL INPUTS & FORMS
   ======================================================== */
.clay-input,
.clay-select,
textarea.clay-input {
  width: 100%;
  background: var(--bg-sunken);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--clay-text);
  font-size: 14px;
  font-family: inherit;
  box-shadow: 
    inset 3px 3px 6px rgba(0, 0, 0, 0.65),
    inset -1px -1px 2px rgba(255, 255, 255, 0.04);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.clay-input:focus,
.clay-select:focus,
textarea.clay-input:focus {
  border-color: var(--clay-primary);
  box-shadow: 
    inset 3px 3px 6px rgba(0, 0, 0, 0.65),
    0 0 0 3px rgba(0, 230, 118, 0.2);
}

.clay-input::placeholder {
  color: #556277;
}

.clay-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238b99b0' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.clay-select option {
  background: #141c2c;
  color: #fff;
  padding: 10px;
}

/* Switches & Checkboxes */
.clay-switch-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: var(--clay-text);
}

.clay-checkbox {
  appearance: none;
  width: 22px;
  height: 22px;
  background: var(--bg-sunken);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

.clay-checkbox:checked {
  background: var(--clay-primary);
  border-color: var(--clay-primary);
  box-shadow: 0 0 12px var(--clay-primary-glow);
}

.clay-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #032010;
  font-size: 14px;
  font-weight: 800;
}

/* ========================================================
   3. SIGNATURE CLAYMORPHIC 3-BUTTON SYSTEM
   ======================================================== */
.clay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
  letter-spacing: 0.3px;
  font-family: inherit;
  box-sizing: border-box;
}

.clay-btn:active {
  transform: translateY(2px) scale(0.98);
}

.clay-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

/* Sizes */
.clay-btn.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.clay-btn.btn-block {
  width: 100%;
}

.clay-btn.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
  font-size: 18px;
}

/* BUTTON 1: PRIMARY (Neon Aggregator Mint) */
.clay-btn.btn-mint,
.clay-btn-primary {
  background: linear-gradient(145deg, #00ff88, #00b359);
  color: #032010;
  box-shadow: 
    0 8px 20px -4px var(--clay-primary-glow),
    inset 2px 2px 4px rgba(255, 255, 255, 0.45),
    inset -3px -3px 6px rgba(0, 80, 40, 0.6);
}

.clay-btn.btn-mint:hover,
.clay-btn-primary:hover {
  box-shadow: 
    0 12px 24px -2px var(--clay-primary-glow),
    inset 2px 2px 4px rgba(255, 255, 255, 0.55),
    inset -3px -3px 6px rgba(0, 80, 40, 0.6);
}

.clay-btn.btn-mint:active,
.clay-btn-primary:active {
  box-shadow: 
    0 3px 8px var(--clay-primary-glow),
    inset 3px 3px 6px rgba(0, 80, 40, 0.75);
}

/* BUTTON 2: SECONDARY (Solar Amber Gold) */
.clay-btn.btn-amber,
.clay-btn-secondary {
  background: linear-gradient(145deg, #ffb830, #e08700);
  color: #1f1200;
  box-shadow: 
    0 8px 20px -4px var(--clay-secondary-glow),
    inset 2px 2px 4px rgba(255, 255, 255, 0.45),
    inset -3px -3px 6px rgba(120, 60, 0, 0.6);
}

.clay-btn.btn-amber:hover,
.clay-btn-secondary:hover {
  box-shadow: 
    0 12px 24px -2px var(--clay-secondary-glow),
    inset 2px 2px 4px rgba(255, 255, 255, 0.55),
    inset -3px -3px 6px rgba(120, 60, 0, 0.6);
}

.clay-btn.btn-amber:active,
.clay-btn-secondary:active {
  box-shadow: 
    0 3px 8px var(--clay-secondary-glow),
    inset 3px 3px 6px rgba(120, 60, 0, 0.75);
}

/* BUTTON 3: DANGER (Ruby Crimson) */
.clay-btn.btn-crimson,
.clay-btn-danger {
  background: linear-gradient(145deg, #ff4d6d, #d91c42);
  color: #ffffff;
  box-shadow: 
    0 8px 20px -4px var(--clay-danger-glow),
    inset 2px 2px 4px rgba(255, 255, 255, 0.35),
    inset -3px -3px 6px rgba(110, 10, 30, 0.6);
}

.clay-btn.btn-crimson:hover,
.clay-btn-danger:hover {
  box-shadow: 
    0 12px 24px -2px var(--clay-danger-glow),
    inset 2px 2px 4px rgba(255, 255, 255, 0.45),
    inset -3px -3px 6px rgba(110, 10, 30, 0.6);
}

.clay-btn.btn-crimson:active,
.clay-btn-danger:active {
  box-shadow: 
    0 3px 8px var(--clay-danger-glow),
    inset 3px 3px 6px rgba(110, 10, 30, 0.75);
}

/* BUTTON NEUTRAL: DARK CLAY */
.clay-btn.btn-neutral,
.clay-btn-dark {
  background: linear-gradient(145deg, #222d42, #141b2b);
  color: var(--clay-text);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 
    0 6px 14px rgba(0, 0, 0, 0.4),
    inset 1px 1px 3px rgba(255, 255, 255, 0.08),
    inset -2px -2px 4px rgba(0, 0, 0, 0.5);
}

.clay-btn.btn-neutral:hover,
.clay-btn-dark:hover {
  background: linear-gradient(145deg, #28354e, #182236);
  color: #fff;
}

/* ========================================================
   4. CLAYMORPHIC BADGES & STATUS PILLS
   ======================================================== */
.clay-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-full);
  letter-spacing: 0.4px;
  box-shadow: inset 1px 1px 2px rgba(255, 255, 255, 0.12), 0 3px 6px rgba(0, 0, 0, 0.3);
}

.clay-badge.badge-success {
  background: rgba(0, 230, 118, 0.12);
  color: #00ff88;
  border: 1px solid rgba(0, 230, 118, 0.3);
}

.clay-badge.badge-warning {
  background: rgba(255, 170, 0, 0.12);
  color: #ffaa00;
  border: 1px solid rgba(255, 170, 0, 0.3);
}

.clay-badge.badge-danger {
  background: rgba(255, 56, 96, 0.12);
  color: #ff4d6d;
  border: 1px solid rgba(255, 56, 96, 0.3);
}

.clay-badge.badge-neutral {
  background: rgba(139, 153, 176, 0.12);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.clay-badge.badge-info {
  background: rgba(0, 210, 211, 0.12);
  color: #00d2d3;
  border: 1px solid rgba(0, 210, 211, 0.3);
}

/* Pulse animation for pending badges */
.animate-pulse {
  animation: clayPulse 1.8s infinite;
}

@keyframes clayPulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.85; }
  100% { transform: scale(1); opacity: 1; }
}

/* ========================================================
   5. SPINNER & LOADERS
   ======================================================== */
.clay-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  border-top-color: currentColor;
  animation: claySpin 0.7s linear infinite;
  vertical-align: middle;
}

@keyframes claySpin {
  to { transform: rotate(360deg); }
}

/* ========================================================
   6. GLOBAL TOAST NOTIFICATIONS
   ======================================================== */
.toast-container,
#toastContainer {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 380px;
  width: 90%;
}

.clay-toast {
  pointer-events: auto;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: #182236;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 
    inset 2px 2px 4px rgba(255, 255, 255, 0.08),
    inset -2px -2px 4px rgba(0, 0, 0, 0.5),
    0 14px 28px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  animation: toastSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.clay-toast.toast-success {
  border-left: 4px solid var(--clay-primary);
}

.clay-toast.toast-error {
  border-left: 4px solid var(--clay-danger);
}

.clay-toast.toast-warning {
  border-left: 4px solid var(--clay-secondary);
}

.clay-toast.toast-info {
  border-left: 4px solid var(--clay-cyan);
}

@keyframes toastSlide {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideDown {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(-20px); opacity: 0; }
}
