/* =========================================================
   Positive Touch — Shared Theme Variables (Dark + Light)
   ========================================================= */

/* ── Dark theme (default, current) ─────────────────────── */
:root,
[data-theme="dark"] {
  /* Backgrounds */
  --pt-bg-page:              #182048;
  --pt-bg-surface:           #2A3362;
  --pt-bg-elevated:          #ffffff;   /* forms, modals — stays white */
  --pt-bg-sidepane:          #182048;
  --pt-bg-sidepane-start:    #182048;
  --pt-bg-sidepane-end:      #182048;

  /* Text */
  --pt-text-primary:         #ffffff;
  --pt-text-body:            #cccccc;
  --pt-text-soft:            #8287A6;
  --pt-text-heading:         #ffffff;
  --pt-text-on-light:        #182048;   /* text on white/elevated surfaces */

  /* Borders */
  --pt-border:               rgba(255, 255, 255, 0.12);
  --pt-border-light:         #d9deea;

  /* Shadows */
  --pt-shadow:               0 1px 3px 0 rgba(0, 0, 0, 0.2);
  --pt-shadow-lg:            0 3px 6px 0 rgba(0, 0, 0, 0.16);

  /* Brand (unchanged) */
  --pt-green:                #1DAE8D;
  --pt-orange:               #FCB321;
  --pt-red:                  #e03e2f;

  /* Form / auth pages */
  --pt-auth-bg:              #1f2858;
  --pt-auth-bg-2:            #242f66;
  --pt-auth-side-bg:         #ffffff;
  --pt-auth-text:            #2a3362;
  --pt-auth-text-soft:       #6d7390;
  --pt-auth-danger:          #dc4d4d;
}

/* ── Theme Toggle Button ────────────────────────────────── */
.pt-theme-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--pt-bg-surface, #2A3362);
  color: #ffffff !important;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.pt-theme-toggle:hover {
  background: white;
  color: var(--pf-dark-navy, #182048) !important;
}

.pt-theme-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--pt-green, #1DAE8D);
}

[data-theme="light"] .pt-theme-toggle {
  background: #fff;
  color: var(--pt-navy-dark, #182048) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

[data-theme="light"] .pt-theme-toggle:hover {
    background: var(--pt-navy, #2A3362);
    color: #ffffff !important;
}

/* Toggle on auth pages (top-right, smaller) */
.pt-theme-toggle--auth {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: auto;
  width: 36px;
  height: 36px;
  z-index: 10;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

[data-theme="light"] .pt-theme-toggle--auth {
  background: var(--pt-auth-side-bg, #ffffff);
  color: var(--pt-navy-dark, #182048);
}

/* ── Moon/Sun icon visibility — CSS-driven (no JS needed) ── */
.pt-theme-moon {
  display: block;
}
.pt-theme-sun {
  display: none;
}
[data-theme="light"] .pt-theme-moon {
  display: none;
}
[data-theme="light"] .pt-theme-sun {
  display: block;
}
[data-theme="light"] {
  /* Backgrounds */
  --pt-bg-page:              #ffffff;
  --pt-bg-surface:           #f5f5f5;
  --pt-bg-elevated:          #ffffff;
  --pt-bg-sidepane:          #f5f5f5;
  --pt-bg-sidepane-start:    #f5f5f5;
  --pt-bg-sidepane-end:      #f0f0f0;

  /* Text */
  --pt-text-primary:         #182048;
  --pt-text-body:            #333333;
  --pt-text-soft:            #6d7390;
  --pt-text-heading:         #182048;
  --pt-text-on-light:        #182048;

  /* Borders */
  --pt-border:               rgba(24, 32, 72, 0.12);
  --pt-border-light:         #d0d5e0;

  /* Shadows */
  --pt-shadow:               0 1px 3px 0 rgba(0, 0, 0, 0.08);
  --pt-shadow-lg:            0 3px 6px 0 rgba(0, 0, 0, 0.10);

  /* Brand (unchanged) */
  --pt-green:                #1DAE8D;
  --pt-orange:               #FCB321;
  --pt-red:                  #e03e2f;

  /* Form / auth pages */
  --pt-auth-bg:              #f5f0e8;
  --pt-auth-bg-2:            #eff1f3;
  --pt-auth-side-bg:         #ffffff;
  --pt-auth-text:            #182048;
  --pt-auth-text-soft:       #6d7390;
  --pt-auth-danger:          #dc4d4d;
}

/* ── Theme-aware watermark ──────────────────────────────── */
[data-theme="light"] .pt-auth-watermark {
  content: url("/public/images/identity/svg-logo-watermark-dark-t.svg");
}
