/* NOTE: Lines 1-103 duplicate ocd-points-popup.css for standalone loading.
   If both files are always loaded together, this block can be removed. */

/* OCD Points Popup - Standalone Module
   Exact CSS from mockup.html for the points notification system */

/* --- Points Float (upper right, below menu, above everything) --- */
.eng-points-float {
  position: fixed; top: 60px; right: 16px;
  z-index: 10010; display: none; pointer-events: none;
}
.eng-points-float.show { display: block; animation: engFloatIn 0.5s ease-out forwards; }
.eng-points-float.hiding { animation: engFloatOut 0.5s ease-in forwards; }
@keyframes engFloatIn {
  0% { opacity: 0; transform: translateY(20px) scale(0.5); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes engFloatOut {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-30px) scale(0.8); }
}
@keyframes engPointsGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(253,183,36,0.4), 0 0 30px rgba(253,183,36,0.2); }
  50% { box-shadow: 0 0 25px rgba(253,183,36,0.7), 0 0 50px rgba(253,183,36,0.4), 0 0 80px rgba(253,183,36,0.2); }
}
@keyframes engSparkle {
  0% { transform: scale(0) rotate(0deg); opacity: 1; }
  50% { transform: scale(1) rotate(180deg); opacity: 0.8; }
  100% { transform: scale(0) rotate(360deg); opacity: 0; }
}
.eng-points-float-inner {
  background: #26367a;
  color: #fdb724; border-radius: 14px; padding: 14px 22px;
  text-align: center; font-weight: 900; font-size: 24px;
  box-shadow: 0 0 20px rgba(253,183,36,0.5), 0 0 40px rgba(253,183,36,0.3);
  border: 2px solid rgba(253,183,36,0.5);
  text-shadow: 0 0 10px rgba(253,183,36,0.6), 0 0 20px rgba(253,183,36,0.3);
  animation: engPointsGlow 0.8s ease-in-out infinite;
  position: relative;
}
.eng-points-float-inner::before,
.eng-points-float-inner::after {
  content: '\2728'; position: absolute; font-size: 16px;
  animation: engSparkle 0.8s ease-out forwards;
}
.eng-points-float-inner::before { top: -10px; left: -8px; animation-delay: 0.1s; }
.eng-points-float-inner::after { bottom: -10px; right: -8px; animation-delay: 0.3s; }
.eng-points-float-inner small { display: block; font-size: 11px; color: #ddd; font-weight: 400; margin-top: 3px; }

/* --- Double Points Candy Crush Effect --- */
.eng-double-indicator {
  display: inline-block; background: linear-gradient(135deg, #e53935, #ff6f00);
  color: #fff; font-size: 12px; font-weight: 900; padding: 3px 8px;
  border-radius: 10px; margin-left: 6px;
  animation: engDoublePop 0.6s cubic-bezier(0.36, 1.5, 0.6, 1) forwards;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
@keyframes engDoublePop {
  0% { transform: scale(0) rotate(-20deg); opacity: 0; }
  60% { transform: scale(1.4) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
/* Candy crush style burst overlay */
.eng-candy-burst {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 10004;
}
.eng-candy-star {
  position: absolute; font-size: 24px;
  animation: engCandyStar 1.2s ease-out forwards;
  pointer-events: none;
}
@keyframes engCandyStar {
  0% { transform: scale(0) rotate(0deg); opacity: 1; }
  20% { transform: scale(1.8) rotate(180deg); opacity: 1; }
  50% { transform: scale(1.2) rotate(360deg) translateY(-40px); opacity: 1; }
  100% { transform: scale(0.3) rotate(720deg) translateY(-120px); opacity: 0; }
}
.eng-candy-streak {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 48px; font-weight: 900; color: #fff;
  text-shadow: 0 0 20px #fdb724, 0 0 40px #e53935, 0 0 60px #ff6f00, 2px 2px 0 #26367a;
  z-index: 10005; pointer-events: none;
  animation: engCandyStreak 5s cubic-bezier(0.36, 1.5, 0.6, 1) forwards;
}
@keyframes engCandyStreak {
  0% { transform: translate(-50%, -50%) scale(0) rotate(-15deg); opacity: 0; }
  10% { transform: translate(-50%, -50%) scale(1.4) rotate(3deg); opacity: 1; }
  20% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
  70% { transform: translate(-50%, -50%) scale(1.05) rotate(0deg); opacity: 1; }
  85% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(0.7) translateY(-30px); opacity: 0; }
}
.eng-candy-ring {
  position: fixed; top: 50%; left: 50%;
  width: 0; height: 0; border-radius: 50%;
  border: 4px solid rgba(253,183,36,0.6);
  transform: translate(-50%, -50%);
  z-index: 10004; pointer-events: none;
  animation: engCandyRing 1.5s ease-out forwards;
}
@keyframes engCandyRing {
  0% { width: 0; height: 0; opacity: 1; border-width: 4px; }
  100% { width: 500px; height: 500px; opacity: 0; border-width: 1px; }
}

/* pulse-glow — removed (not used by chat bundle JS) */
/* ==========================================================================
   OCD Chat Module - Standalone CSS
   Works on any site, no WordPress dependency.
   ========================================================================== */

/* --- Chat Bubble (floating bottom-right) --- */
.eng-chat-bubble {
  position: fixed; bottom: 70px; right: 16px;
  width: 52px; height: 52px;
  background: #26367a;
  border: 2px solid rgba(253,183,36,0.45);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,0.4), 0 0 12px rgba(253,183,36,0.2); z-index: 9999;
  transition: transform 0.2s;
}
.eng-chat-bubble:hover { transform: scale(1.08); }

/* --- Chat Badge (unread count on bubble) --- */
.eng-chat-badge {
  position: absolute; top: -2px; right: -2px;
  background: #e53935; color: #fff; font-size: 10px; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #26367a;
}

/* --- Chat Window --- */
.eng-chat-window {
  position: fixed; bottom: 70px; right: 16px;
  width: calc(100% - 32px); max-width: 360px;
  background: #26367a; border-radius: 16px 16px 4px 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 40px rgba(253,183,36,0.1); z-index: 10000;
  display: none; flex-direction: column; overflow: hidden; max-height: 500px;
  /* border: 1px solid rgba(253,183,36,0.4); */
}
.eng-chat-window.open { display: flex; }

/* --- Maximize --- */
.eng-chat-window.maximized { max-height: calc(100vh - 50px); bottom: 10px; top: 50px; height: auto; }
.eng-chat-window.maximized .eng-chat-body { max-height: none; flex: 1; }
.eng-chat-window.maximized .eng-chat-tab-panel { max-height: none; flex: 1; }
.eng-chat-maximize { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; margin-right: 4px; }

.eng-chat-msg-header { display: flex; align-items: center; white-space: nowrap; }
.eng-chat-msg-header [class*="eng-chat-name"] { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* --- Chat Header --- */
.eng-chat-head {
  background: #1c285a;
  color: #fff; padding: 12px 16px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid rgba(253,183,36,0.3);
  /* text-shadow: 0 0 8px rgba(253,183,36,0.3); */
}
.eng-chat-head > strong:before { content: ''; position: relative; display: inline-block; width: 20px; height: 20px; top: -1px; margin-right: 8px; vertical-align: middle; background: url(/wp-content/themes/generel/visual/friendship.png) no-repeat center center / contain; }
.eng-chat-head > span { overflow: hidden; }
.eng-chat-close { background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; }

/* --- Chat Tabs --- */
.eng-chat-tabs {
  display: flex; gap: 0; background: #fff;
  border-bottom: 1px solid #26367a1a;
  position: sticky; top: 0; z-index: 2;
}
.eng-chat-tab {
  flex: 1 1 auto; background: none; border: none; color: #a8b4c2;
  font-size: 13px; font-weight: 600; padding: 9px 2px 7px;
  cursor: pointer; transition: color 0.2s, background 0.2s;
  border-bottom: 2px solid transparent; white-space: nowrap; min-width: 0;
}
.eng-chat-tab:hover { color: #0066cc; background: rgba(38, 54, 122, 0.08); }
.eng-chat-tab.active { color: #0066cc; border-bottom-color: #26367a; background: rgba(38, 54, 122, 0.08); }

/* --- Chat Tab Panel --- */
.eng-chat-tab-panel {
  flex: 1; overflow-y: auto; padding: 12px; background: #fff;
  color: #343434; font-size: 13px; max-height: 280px;
}
.eng-chat-tab-panel h4 { color: #26367a; font-size: 14px; margin: 0 0 10px; }
.eng-chat-tab-panel .eng-tab-close {
  float: right; background: none; border: none; color: #a8b4c2;
  font-size: 18px; cursor: pointer; line-height: 1;
}
.eng-chat-tab-panel .eng-tab-close:hover { color: #0066cc; }

/* --- Chat Body (messages area) --- */
.eng-chat-body {
  flex: 1; overflow-y: auto; padding: 12px;
  display: flex; flex-direction: column; gap: 10px; max-height: 280px;
  /* background: #26367a;
  background-image: radial-gradient(ellipse at 20% 50%, rgba(253,183,36,0.03) 0%, transparent 50%),
                    radial-gradient(ellipse at 80% 20%, rgba(100,130,255,0.04) 0%, transparent 50%); */
  /* background: url(/wp-content/themes/generel/visual/notifications.png) no-repeat center center / cover; */
  background: #fff; 
}

/* --- Chat Messages --- */
.eng-chat-msg { max-width: 85%; font-size: 13px; padding: 10px 12px; border-radius: 10px; color: #343434; background: #eff3fb; }
.eng-chat-msg.eng-chat-msg-own { margin-left: auto; background: #dae4f0; }
.eng-chat-msg.system { background: rgba(253,183,36,0.1); color: #fdb724; font-size: 12px; border: 1px solid rgba(253,183,36,0.4); }
/* .highlight and .ai message types — re-enable if server sends these types */
.eng-chat-msg.moderated { background: rgba(198,40,40,0.15); color: #ff6b6b; font-size: 11px; font-style: italic; border: 1px solid rgba(198,40,40,0.3); }
.eng-chat-msg.redemption {
  border-left: 3px solid #fdb724;
  background: rgba(253,183,36,0.08);
  margin-bottom: 2px;
}
.eng-chat-msg.promo {
  background: #26367a; border: 1px solid #26367a;
  position: relative; padding-top: 22px;
}
.eng-chat-msg.promo .eng-promo-label {
  position: absolute; top: 4px; right: 8px; font-size: 9px; color: #a8b4c2;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.eng-chat-msg.downvoted { opacity: 0.35; font-size: 11px; }
.eng-chat-msg.downvoted::after {
  content: ' (von Community als nicht hilfreich markiert)';
  font-style: italic; color: #f44336; font-size: 10px;
}

/* --- Timestamp --- */
.eng-chat-time { display: inline-block; margin: 0 0 0 5px; vertical-align: middle; font-size: 10px; color: #a8b4c2; }

/* --- Points Badge (inline) --- */
.eng-chat-pts-badge { display: inline-block; vertical-align: middle; background: #fdb724; color: #26367a; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; }

/* --- Power User Tier Name Colors --- */
.eng-chat-name-elite,
.eng-chat-name-starter { display: inline-block; vertical-align: middle; font-size: 12px; font-weight: 400; color: rgba(52, 52, 52, .64); }

.eng-chat-msg-text { display: block; padding: 5px 0; font-size: 15px; line-height: 1.2; }

/* --- Chat Badges --- */
.ig-engage-chat-badge {
  font-size: 7px; background: rgba(76, 175, 80, 1); color: #fff;
  padding: 1px 5px; border-radius: 6px; margin-left: 3px;
  cursor: default; vertical-align: middle;
}

/* Tier message styling and tier badges — removed (not used by JS) */

/* --- Chat Input Row --- */
.eng-chat-input-row { display: flex; border-top: 1px solid #26367a1a; padding: 8px; gap: 6px; background: #dae4f0; }
.eng-chat-input { flex: 1; border: 0; border-radius: 20px; padding: 8px 14px; font-size: 13px; outline: none; background: #fff; }
.eng-chat-input::placeholder { color: #a8b4c2; }
.eng-chat-send { background: #26367a; color: #fff; border: none; border-radius: 50%; width: 36px; height: 36px; cursor: pointer; font-size: 16px; font-weight: 700; }

/* --- Chat Cooldown --- */
.eng-chat-cooldown {
  text-align: center; font-size: 11px; color: #a8b4c2; padding: 6px;
  border-top: 1px solid #26367a1a; display: none; background: #dae4f0;
}
.eng-chat-cooldown.active { display: block; }
.eng-chat-cooldown-bar {
  height: 3px; background: rgba(255,255,255,0.1); border-radius: 2px; margin-top: 4px; overflow: hidden;
}
.eng-chat-cooldown-fill {
  height: 100%; background: linear-gradient(90deg, #fdb724, #e09400);
  border-radius: 2px; width: 0%; transition: width 1s linear;
}

/* --- Guest Name Bar --- */
.eng-guest-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; background: #eff3fb;
  border-bottom: 1px solid #26367a1a;
  font-size: 11px; color: #343434;
}
.eng-guest-bar input {
  flex: 1; background: #fff; border: 1px solid rgba(38,54,122,0.15);
  border-radius: 6px; padding: 4px 8px; color: #343434; font-size: 11px;
}
.eng-guest-bar input::placeholder { color: #a8b4c2; }
.eng-guest-bar button {
  background: #26367a; color: #fff; border: none; border-radius: 6px;
  padding: 4px 10px; font-size: 11px; font-weight: 700; cursor: pointer;
}

/* --- Guest Name Display --- */
.eng-guest-name-display {
  display: none !important; font-size: 11px; color: #343434; font-weight: 700;
  padding: 4px 10px; background: #eff3fb;
  border-bottom: 1px solid #26367a1a;
  align-items: center; justify-content: space-between;
}
.eng-guest-name-display button {
  background: none; border: none; color: #a8b4c2; font-size: 10px; cursor: pointer;
}

/* --- Chat Message Voting (Thumbs) --- */
.eng-chat-msg-actions {
  display: flex; align-items: center; gap: 6px; margin-top: 4px;
}
.eng-chat-vote {
  background: none; color: #8b99a8; border: 0; 
  padding: 1px 3px; cursor: pointer; font-size: 11px;
  transition: all 0.2s; display: flex; align-items: center; gap: 2px;
}
.eng-chat-vote:hover { border-color: #0066cc; color: #0066cc; }
.eng-chat-vote.voted { border-color: #4caf50; color: #4caf50; }
.eng-chat-vote.voted-down { border-color: #f44336; color: #f44336; }
.eng-chat-vote-count { font-weight: 700; font-size: 10px; }

/* --- Reply Button --- */
.eng-chat-reply-btn {
  background: none; border: none; color: #8b99a8; font-size: 11px;
  cursor: pointer; padding: 1px 4px;
}
.eng-chat-reply-btn:hover { color: #0066cc; }

/* --- Chat Reply Threading --- */
.eng-chat-reply {
  margin-left: 16px; padding-left: 8px;
  border-left: 2px solid rgba(38,54,122,0.25);
}
.eng-chat-reply-quote {
  font-size: 10px; color: #a8b4c2; font-style: italic;
  margin-bottom: 3px; max-height: 28px; overflow: hidden;
}

/* Notifications and missions-in-chat styles — removed (not used by JS) */
/* OCD Quiz Module — standalone, no framework dependency */

/* --- Quiz / Poll Toast --- */
.ocd-quiz-toast {
  position: fixed; bottom: 130px; left: 16px; right: 80px;
  max-width: 300px; z-index: 9996;
  background: linear-gradient(135deg, #1a56db, #06c);
  color: #fff; border-radius: 14px; padding: 14px 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
  display: none; cursor: pointer;
  animation: ocdQuizSlideUp 0.4s ease;
}
.ocd-quiz-toast.show { display: block; }

@keyframes ocdQuizSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ocd-quiz-toast-label {
  font-size: 10px; text-transform: uppercase; opacity: 0.7; margin-bottom: 4px;
}
.ocd-quiz-toast-q {
  font-size: 13px; font-weight: 600; line-height: 1.4;
}
.ocd-quiz-toast-close {
  position: absolute; top: 6px; right: 10px; background: none; border: none;
  color: rgba(255,255,255,0.6); font-size: 18px; cursor: pointer;
}

/* --- Quiz Panel (in container) --- */
.ocd-quiz-panel {
  padding: 12px; font-size: 13px; color: #343434;
}
.ocd-quiz-panel-q {
  font-size: 14px; font-weight: 700; color: #343434; margin-bottom: 10px; line-height: 1.4;
}
.ocd-quiz-panel-label {
  font-size: 10px; text-transform: uppercase; color: #0066cc;
  margin-bottom: 6px; font-weight: 700;
}

/* --- Poll Options --- */
.ocd-poll-options {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px;
}
.ocd-poll-opt {
  background: #eff3fb; border: 1px solid rgba(38,54,122,0.15);
  border-radius: 16px; padding: 4px 10px; font-size: 11px; color: #26367a;
  cursor: pointer; transition: all 0.2s;
}
.ocd-poll-opt:hover { background: #dae4f0; }
.ocd-poll-opt.selected { background: #26367a; color: #fff; font-weight: 700; }
.ocd-poll-opt.correct  { background: #4caf50; border-color: #4caf50; color: #fff; font-weight: 700; }
.ocd-poll-opt.wrong    { background: #e53935; border-color: #e53935; color: #fff; font-weight: 700; }

/* --- Poll Results --- */
.ocd-poll-result {
  margin-top: 6px; font-size: 11px;
}
.ocd-poll-result-bar {
  display: flex; align-items: center; gap: 6px; margin: 2px 0;
}
.ocd-poll-result-fill {
  height: 14px; border-radius: 3px; background: rgba(38,54,122,0.15);
  display: flex; align-items: center; padding: 0 6px;
  font-size: 10px; font-weight: 700; color: #26367a; min-width: 30px;
  transition: width 0.5s;
}
.ocd-poll-result-label { font-size: 10px; color: rgba(52,52,52,.64); }

/* --- Feedback --- */
.ocd-quiz-feedback {
  margin-top: 8px; padding: 8px 10px; border-radius: 8px;
  font-size: 12px; font-weight: 600;
}
.ocd-quiz-feedback.correct {
  background: rgba(76,175,80,0.15); color: #4caf50;
}
.ocd-quiz-feedback.wrong {
  background: rgba(229,57,53,0.15); color: #e53935;
}
/* Leaderboard tab + referral tab styles — removed (JS uses inline styles for both) */

.eng-chat-window .ocd-lb-period-btn { font-size: 10px; background: #eff3fb; }
.eng-chat-window .ocd-lb-period-btn:hover { background: #dae4f0; color: #0066cc; }
.eng-chat-window .ocd-lb-period-btn.active { background: #dae4f0; color: #0066cc; }

/* --- TEMP (2026-07-07): Rangliste-Tab im Chat-Fenster ausgeblendet.
   Zum Wiedereinblenden diese Regel einfach entfernen. --- */
.eng-chat-tabs .eng-chat-tab[data-tab="rangliste"] { display: none !important; }

/* --- Deduction (points spent) variant: red, no celebration sparkles --- */
.eng-points-float--minus .eng-points-float-inner {
  background: #7f1d1d;
  color: #ffb4b4;
  box-shadow: 0 0 20px rgba(229,57,53,0.5), 0 0 40px rgba(229,57,53,0.3);
  border: 2px solid rgba(229,57,53,0.6);
  text-shadow: 0 0 10px rgba(229,57,53,0.6), 0 0 20px rgba(229,57,53,0.3);
  animation: engPointsGlowMinus 0.8s ease-in-out infinite;
}
.eng-points-float--minus .eng-points-float-inner::before,
.eng-points-float--minus .eng-points-float-inner::after { content: none; }
.eng-points-float--minus .eng-points-float-inner small { color: #f1caca; }
@keyframes engPointsGlowMinus {
  0%, 100% { box-shadow: 0 0 15px rgba(229,57,53,0.4), 0 0 30px rgba(229,57,53,0.2); }
  50% { box-shadow: 0 0 25px rgba(229,57,53,0.7), 0 0 50px rgba(229,57,53,0.4), 0 0 80px rgba(229,57,53,0.2); }
}
