/* ============================================
   COMPONENTS – Buttons, Cards, Toggle, Forms, Badges
   ============================================ */

/* ── Luxury Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  line-height: 1;
  border: none;
  border-radius: var(--radius-full); /* Pure capsule pill buttons */
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

/* Premium High-Contrast Solid Sand-Gold Button (Inspired by getloume.com & osmo.supply) */
.btn--primary {
  background: var(--gradient-primary);
  color: var(--surface-0);
  box-shadow: 0 4px 16px var(--primary-glow), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  border: 1px solid hsla(38, 55%, 58%, 0.4);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-glow), 0 0 20px var(--primary-subtle);
  background: linear-gradient(135deg, hsl(38, 65%, 62%), hsl(28, 70%, 54%));
  border-color: hsla(38, 70%, 70%, 0.6);
}

.btn--primary:active {
  transform: translateY(0);
}

/* Frosted Dark Glass Button (Inspired by osmo.supply) */
.btn--secondary {
  background: hsla(240, 10%, 100%, 0.05);
  color: var(--text-primary);
  border: var(--border-subtle);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn--secondary:hover {
  background: hsla(240, 10%, 100%, 0.1);
  border-color: hsla(240, 10%, 100%, 0.2);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: var(--space-2) var(--space-4);
  border: 1px solid transparent;
}

.btn--ghost:hover {
  color: var(--text-primary);
  background: hsla(240, 10%, 100%, 0.04);
  border-color: var(--glass-border);
}

.btn--danger {
  background: hsla(355, 85%, 56%, 0.15);
  color: var(--danger-light);
  border: 1px solid hsla(355, 85%, 56%, 0.25);
}

.btn--danger:hover {
  background: var(--danger);
  color: white;
  box-shadow: 0 4px 16px rgba(230, 40, 60, 0.2);
}

.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--fs-base);
  border-radius: var(--radius-full);
}

.btn--sm {
  padding: var(--space-2) var(--space-5);
  font-size: var(--fs-xs);
  border-radius: var(--radius-full);
}

.btn--full {
  width: 100%;
}

.btn--icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
  font-size: var(--fs-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* Button glow/ripple hover overlay */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), 
    hsla(0, 0%, 100%, 0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--duration-fast);
}

.btn:active::after {
  opacity: 1;
}

/* ── Glassmorphic Cards (Standard card is now glass!) ── */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--glass-shadow);
  transition: all var(--duration-normal) var(--ease-out);
}

.card:hover {
  border-color: hsla(38, 55%, 58%, 0.35);
  box-shadow: var(--glass-shadow), 0 16px 36px -12px var(--primary-glow);
  transform: translateY(-4px) scale(1.01);
}

.card--glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.card--interactive {
  cursor: pointer;
}

.card--glow:hover {
  box-shadow: var(--shadow-glow);
}

/* ── Sleek Capsule Toggle Switch ── */
.toggle {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  user-select: none;
}

.toggle__track {
  position: relative;
  width: 260px;
  height: 48px;
  background: hsla(24, 40%, 20%, 0.14);
  border-radius: var(--radius-full);
  border: var(--border-subtle);
  cursor: pointer;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(24, 40, 20, 0.12);
  transition: all var(--duration-normal) var(--ease-out);
}

.toggle__track:hover {
  background: hsla(24, 40%, 20%, 0.18);
  border-color: hsla(24, 40%, 20%, 0.25);
}

.toggle__slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  background: #ffffff; /* Contrast white slider handle */
  border-radius: var(--radius-full);
  transition: transform var(--duration-slow) var(--ease-spring);
  box-shadow: 0 4px 12px rgba(24, 40, 20, 0.1);
}

/* Primary handle color when active on offer (Anbieter) */
.toggle__track[data-state="offer"] .toggle__slider {
  transform: translateX(calc(100% - 0px));
}

.toggle__labels {
  display: flex;
  position: relative;
  z-index: 2;
  height: 100%;
}

.toggle__label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--duration-normal) var(--ease-out);
  z-index: 2;
}

.toggle__label--active {
  color: var(--text-primary);
}

/* ── Frosted Capsule Form Fields ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-3) var(--space-5);
  background: hsla(240, 12%, 8%, 0.45);
  border: var(--border-subtle);
  border-radius: var(--radius-xl); /* Clean abraded look */
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  transition: all var(--duration-fast) var(--ease-out);
  outline: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--secondary-light);
  box-shadow: 0 0 0 3px var(--secondary-glow);
  background: hsla(240, 12%, 12%, 0.6);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-tertiary);
}

.form-input--hero {
  padding: var(--space-4) var(--space-6);
  font-size: var(--fs-base);
  border-radius: var(--radius-full);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.form-input--hero:focus {
  box-shadow: var(--shadow-glow-secondary);
  border-color: var(--secondary-light);
}

.form-textarea {
  min-height: 110px;
  resize: vertical;
}

.form-error {
  font-size: var(--fs-xs);
  color: var(--danger);
}

/* ── Badges & Counters ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  white-space: nowrap;
}

.badge--primary {
  background: var(--primary-subtle);
  color: var(--primary-light);
  border: 1px solid hsla(255, 85%, 60%, 0.2);
}

.badge--success {
  background: hsla(172, 80%, 40%, 0.1);
  color: var(--secondary-light);
  border: 1px solid hsla(172, 80%, 40%, 0.2);
}

.badge--warning {
  background: hsla(38, 95%, 54%, 0.1);
  color: var(--warning);
  border: 1px solid hsla(38, 95%, 54%, 0.2);
}

.badge--danger {
  background: hsla(355, 85%, 56%, 0.1);
  color: var(--danger-light);
  border: 1px solid hsla(355, 85%, 56%, 0.2);
}

.badge--score {
  background: var(--gradient-primary);
  color: white;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  padding: var(--space-1) var(--space-3);
}

/* ── Floating Notification Counter ── */
.badge-counter {
  position: absolute;
  top: -4px;
  right: -4px;
  z-index: 5;
  min-width: 18px;
  height: 18px;
  padding: 0 var(--space-1);
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: var(--fw-bold);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--surface-0);
  border: 1px solid rgba(255, 255, 255, 0.25);
  animation: counter-pop var(--duration-normal) var(--ease-spring);
}

@keyframes counter-pop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

/* ── Glowing Avatar ── */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  color: white;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 12px var(--primary-glow);
  border: 2px solid hsla(0, 0%, 100%, 0.15);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar--lg {
  width: 64px;
  height: 64px;
  font-size: var(--fs-xl);
}

/* ── Filter Pills / Tab selectors ── */
.pills {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.pill {
  padding: var(--space-2) var(--space-5);
  background: hsla(240, 10%, 100%, 0.03);
  border: var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  user-select: none;
}

.pill:hover {
  border-color: hsla(240, 10%, 100%, 0.15);
  color: var(--text-primary);
  background: hsla(240, 10%, 100%, 0.05);
}

.pill--active {
  background: var(--primary-subtle);
  border-color: var(--primary);
  color: var(--primary-light);
  box-shadow: 0 0 12px var(--primary-subtle);
}

/* ── Divider ── */
.divider {
  width: 100%;
  height: 1px;
  background: hsla(240, 10%, 100%, 0.05);
  margin: var(--space-6) 0;
}

/* ── Glassmorphic Toast Alerts ── */
.toast {
  position: fixed;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  color: var(--text-primary);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-full);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  box-shadow: var(--shadow-xl), var(--glass-shadow);
  z-index: var(--z-toast);
  opacity: 0;
  transition: all var(--duration-slow) var(--ease-spring);
  pointer-events: none;
  border: var(--border-subtle);
}

.toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.toast--success { 
  border-left: 4px solid var(--secondary); 
  box-shadow: 0 8px 30px -10px var(--secondary-glow);
}
.toast--error { 
  border-left: 4px solid var(--danger); 
  box-shadow: 0 8px 30px -10px hsla(355, 85%, 56%, 0.3);
}

/* ── Sleek Spinner ── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid hsla(240, 10%, 100%, 0.1);
  border-top-color: var(--primary-light);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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

.spinner--lg {
  width: 36px;
  height: 36px;
  border-width: 3px;
}

/* ── Empty State ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-16) var(--space-6);
  text-align: center;
}

.empty-state__icon {
  font-size: 2.5rem;
  opacity: 0.6;
  filter: drop-shadow(0 0 10px var(--primary-glow));
}

.empty-state__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
}

.empty-state__text {
  color: var(--text-secondary);
  max-width: 360px;
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}

/* ── GPS Status Widget ── */
.gps-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  padding: var(--space-2) var(--space-4);
  background: hsla(240, 10%, 100%, 0.03);
  border: var(--border-subtle);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.gps-status:hover {
  background: hsla(240, 10%, 100%, 0.05);
  border-color: hsla(240, 10%, 100%, 0.15);
  color: var(--text-primary);
}

.gps-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-tertiary);
}

.gps-status--active .gps-status__dot {
  background: #10b981; /* Leuchtendes Neon-Grün */
  box-shadow: 0 0 12px #10b981;
  animation: pulse-dot 1.5s infinite;
}

.gps-status--fallback .gps-status__dot {
  background: var(--warning);
  box-shadow: 0 0 8px var(--warning);
  animation: pulse-dot 2s infinite;
}

.gps-status--error .gps-status__dot {
  background: var(--danger);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.9); }
}

/* ── Frosted Overlay & Modals ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: hsla(240, 20%, 3%, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: var(--z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.modal-overlay--active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  max-width: 460px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.94) translateY(15px);
  transition: transform var(--duration-slow) var(--ease-spring);
  box-shadow: var(--glass-shadow), var(--shadow-xl);
}

.modal-overlay--active .modal {
  transform: scale(1) translateY(0);
}

/* ── Icon System (Premium Vector SVGs) ── */
.icon {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  stroke-width: 2.2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  position: relative;
  top: -1px;
  transition: all var(--duration-fast) var(--ease-out);
}

.icon--accent {
  stroke: var(--secondary-light); /* Hellbraun / Caramel */
  filter: drop-shadow(0 0 6px var(--secondary-glow));
}

.icon--lg {
  width: 1.8em;
  height: 1.8em;
  stroke-width: 1.8;
}

.icon--xl {
  width: 2.4em;
  height: 2.4em;
  stroke-width: 1.5;
}

.icon--logo {
  width: 1.4rem;
  height: 1.4rem;
  stroke: currentColor;
  fill: none;
}

/* ── Premium Header Action Buttons ── */
.header__action-btn {
  background: hsla(35, 30%, 100%, 0.75);
  border: 1.5px solid hsla(24, 40%, 28%, 0.25);
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--primary);
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
  outline: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header__action-btn:hover {
  transform: translateY(-1.5px);
  border-color: var(--primary);
  box-shadow: 0 0 14px var(--primary-glow);
  color: var(--primary-dark);
  background: hsla(35, 30%, 100%, 0.9);
}

.header__action-btn .avatar {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent !important;
  box-shadow: none;
  color: var(--primary);
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-out);
}

.header__action-btn:hover .avatar {
  color: var(--primary-dark);
}

/* Override existing bell button to match */
#notification-btn {
  background: hsla(35, 30%, 100%, 0.75);
  border: 1.5px solid hsla(24, 40%, 28%, 0.25);
  color: var(--primary);
  transition: all var(--duration-fast) var(--ease-out);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: visible !important;
}

#notification-btn:hover {
  transform: translateY(-1.5px);
  border-color: var(--primary);
  box-shadow: 0 0 14px var(--primary-glow);
  color: var(--primary-dark);
  background: hsla(35, 30%, 100%, 0.9);
  animation: bell-wiggle var(--duration-normal) var(--ease-out);
}

/* ── Premium Profile Dropdown Menu ── */
.profile-dropdown {
  position: absolute;
  top: calc(100% + var(--space-3));
  right: 0;
  width: 250px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl), var(--glass-shadow);
  z-index: var(--z-dropdown);
  display: none;
  padding: var(--space-4) 0;
}

.profile-dropdown--open {
  display: block;
  animation: dropdown-slide-down 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdown-slide-down {
  0% { transform: translateY(-10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.profile-dropdown__header {
  padding: var(--space-2) var(--space-5) var(--space-3) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.profile-dropdown__avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--primary-subtle);
  border: 1px solid hsla(38, 55%, 58%, 0.25);
  color: var(--primary-light);
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  font-size: var(--fs-xs);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-dropdown__user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.profile-dropdown__name {
  font-family: var(--font-sans);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: var(--lh-tight);
}

.profile-dropdown__email {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.profile-dropdown__divider {
  height: 1px;
  background: hsla(240, 10%, 100%, 0.05);
  margin: var(--space-2) 0;
}

.profile-dropdown__menu {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: 0;
  margin: 0;
}

.profile-dropdown__item {
  width: 100%;
  background: none;
  border: none;
  padding: var(--space-3) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  text-align: left;
  outline: none;
}

.profile-dropdown__item:hover {
  background: hsla(240, 10%, 100%, 0.03);
  color: var(--primary-light);
  padding-left: calc(var(--space-5) + var(--space-1));
}

.profile-dropdown__item svg {
  transition: color var(--duration-fast) var(--ease-out);
  width: 1.1em;
  height: 1.1em;
}

.profile-dropdown__item:hover svg {
  color: var(--primary-light);
}

.profile-dropdown__item--logout {
  color: var(--text-secondary);
  border-top: 1px solid hsla(240, 10%, 100%, 0.02);
  margin-top: var(--space-1);
}

.profile-dropdown__item--logout:hover {
  color: var(--danger-light) !important;
  background: hsla(355, 75%, 55%, 0.05);
}

.profile-dropdown__item--logout:hover svg {
  color: var(--danger-light) !important;
}


/* ── Card Shimmer Shine Hover Effect ── */
.card, .match-card, .post-card {
  position: relative;
  overflow: hidden;
}

.card::after, .match-card::after, .post-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.22) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  pointer-events: none;
  z-index: 2;
}

.card:hover::after, .match-card:hover::after, .post-card:hover::after {
  animation: shimmer-shine 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Floating Background Watermark ── */
.bg-watermark {
  position: fixed;
  top: 55%;
  left: 50%;
  width: 550px;
  height: 550px;
  margin-top: -275px;
  margin-left: -275px;
  opacity: 0.038;
  pointer-events: none;
  z-index: -1;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
}
