/* ═══════════════════════════════════════════════════════════════════════
   MNEMOTEHNIC WIDGETS CSS — ALL-IN-ONE STYLES
   Versiunea: 2.0 | Martie 2026
   
   Include TOATE stilurile necesare pentru documente mnemotehnice:
   1. Document Layout (wrapper, paragraf, box-uri)
   2. Navigatie sticky
   3. Widget-uri Rating (stele per sectiune)
   4. Widget-uri Sugestii (formular feedback)
   5. Bookmark FAB
   6. DrCalc Panel
   7. Push Notification Modal
   8. Imagini Mnemotehnice (auto-injectate)
   9. Toast Notifications
   10. Responsive + Print
   
   UTILIZARE: Un singur <link> in <head> — nimic altceva.
   <link rel="stylesheet" href="path/to/mnemotehnic-widgets.css">
   ═══════════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════
   1. VARIABILE, RESET, BODY
   ══════════════════════════════════════════════════════════════ */

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

:root {
  --bg:           #f0f4f8;
  --card:         #ffffff;
  --text:         #1e2a38;
  --muted:        #5a6a7a;
  --blue:         #1a6fa8;
  --blue-light:   #e8f4fb;
  --green:        #1a7a4a;
  --green-light:  #e8f7ed;
  --amber:        #b86e00;
  --amber-light:  #fef6e4;
  --purple:       #6a3ea1;
  --purple-light: #f0eafd;
  --red:          #a82020;
  --red-light:    #fdeaea;
  --dark:         #1a252f;
  --border:       #d0dce8;
  --radius:       10px;
  --shadow:       0 2px 8px rgba(0,0,0,0.09);
}

body {
  font-family: 'Segoe UI', Calibri, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  margin: 0;
}

/* ══════════════════════════════════════════════════════════════
   2. NAVIGATIE STICKY
   ══════════════════════════════════════════════════════════════ */

nav {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #0d1b2a 0%, #1b2838 100%);
  color: #fff;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  flex-wrap: wrap;
}

.nav-brand {
  font-size: 13px;
  font-weight: 700;
  color: #7ecfff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
  letter-spacing: 0.02em;
}

.nav-link {
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav-link:hover { background: rgba(255,255,255,0.1); color: #fff; }

#nav-toggle {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #c0d8f0;
  font-size: 11.5px;
  padding: 5px 12px;
  border-radius: 5px;
  cursor: pointer;
  margin-left: auto;
  transition: background 0.15s;
}
#nav-toggle:hover { background: rgba(255,255,255,0.15); }

#notif-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: #c0d8f0;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s;
}
#notif-btn:hover { background: rgba(255,255,255,0.12); }

#menu-content {
  display: none;
  width: 100%;
  background: #0d1b2a;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 8px 0;
  max-height: 60vh;
  overflow-y: auto;
}
#menu-content.mob-open { display: block; }

#menu-content a {
  display: block;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  padding: 6px 16px;
  font-size: 12px;
  transition: background 0.12s;
}
#menu-content a:hover { background: rgba(126,207,255,0.1); color: #7ecfff; }

/* ══════════════════════════════════════════════════════════════
   3. DOCUMENT LAYOUT (wrapper, master-title, paragraf, box-uri)
   ══════════════════════════════════════════════════════════════ */

.wrapper {
  max-width: 1060px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.master-title {
  background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 36px 40px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}
.master-title h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 8px 0;
}
.master-title .subtitle {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  margin: 0;
}
.master-title .index-table { margin-top: 16px; }
.master-title .index-table a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 12px;
}
.master-title .index-table a:hover { color: #7ecfff; }

.bloc-disclaimer {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  margin-bottom: 24px;
}

.bloc-header, .part-separator {
  font-size: 16px;
  font-weight: 800;
  color: var(--dark);
  padding: 12px 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 16px;
}

.paragraf {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  overflow: hidden;
}

.paragraf-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #2c3e50, #1a252f);
  padding: 11px 16px;
  letter-spacing: 0.02em;
}

.ab-box {
  background: #f5f5f5;
  border-left: 4px solid #aaa;
  padding: 8px 14px;
  font-size: 12.5px;
  margin: 8px 16px;
  border-radius: 0 6px 6px 0;
}

.box {
  border-radius: 8px;
  padding: 12px 16px;
  margin: 10px 16px;
}

.box-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 7px;
}

.lectia-box {
  background: #e6f2fb;
  border-left: 4px solid #0d3b66;
}

.tehnica-box {
  background: #f3eeff;
  border-left: 4px solid #7b5ea7;
}
.tehnica-box .box-label { color: #5c3d99; }

.carlige-box {
  background: var(--amber-light);
  border-left: 4px solid var(--amber);
  margin: 10px 16px;
  border-radius: 8px;
  padding: 12px 16px;
}

.vers-box {
  background: #e8f5e9;
  border-radius: 8px;
  padding: 11px 16px;
  font-style: italic;
  color: #1b5e20;
  margin: 8px 0;
  border-left: 4px solid #2e7d32;
}

.corelatie-box {
  background: #ede7f6;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  color: #311b92;
  margin: 8px 0;
  border-left: 4px solid #5e35b1;
}

/* Ringul comparatiilor (paragraf cu 🥊) — rosu, ca in index.html vechi */
.ring-p {
  background: #fce4ec;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 8px 0;
  border-left: 4px solid #e53935;
}

.carlige-item { margin-bottom: 14px; }
.carlige-item-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 6px;
}

.filtru-badge { display: none; }

/* ══════════════════════════════════════════════════════════════
   4. STATUS BOX + ROAST
   ══════════════════════════════════════════════════════════════ */

.status-box {
  background: #0a1628;
  color: #d0e4ff;
  border: 1.5px solid #2a4a7f;
  border-radius: 10px;
  padding: 14px 20px;
  margin: 24px 0;
  font-size: 13px;
}
.status-line { color: #7ecfff; margin-bottom: 6px; }

.roast-box {
  background: #0f1f3d;
  border-left: 4px solid #e67e22;
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  font-size: 12.5px;
  color: #ffd580;
  margin-top: 8px;
}

/* ══════════════════════════════════════════════════════════════
   5. MNEMONIC IMAGE BOX (auto-injectat de JS)
   ══════════════════════════════════════════════════════════════ */

.mnemonic-image-box {
  margin: 8px 16px;
  border-radius: 8px;
  overflow: hidden;
  background: #f8f9fa;
  border: 1px solid var(--border);
}
.mnemonic-image-box img {
  width: 100%;
  height: auto;
  display: block;
}
.img-ref {
  font-size: 10px;
  color: var(--muted);
  padding: 4px 10px;
  text-align: center;
}

/* ══════════════════════════════════════════════════════════════
   6. BOOKMARK FAB (creat de JS)
   ══════════════════════════════════════════════════════════════ */

#bookmark-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9990;
  background: linear-gradient(135deg, #1a6fa8, #2980b9);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(26,111,168,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
#bookmark-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(26,111,168,0.45);
}

#bk-toast {
  position: fixed;
  bottom: 72px;
  right: 20px;
  z-index: 9989;
  background: #1a252f;
  color: #7ecfff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  display: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  max-width: 280px;
}

/* ══════════════════════════════════════════════════════════════
   7. DRCALC PANEL (creat de JS)
   ══════════════════════════════════════════════════════════════ */

#drcalc-tab {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9980;
  background: #27ae60;
  color: #fff;
  border: none;
  border-radius: 0 8px 8px 0;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  box-shadow: 2px 0 12px rgba(0,0,0,0.2);
  transition: background 0.15s;
}
#drcalc-tab:hover { background: #229954; }

#drcalc-overlay {
  position: fixed;
  inset: 0;
  z-index: 9981;
  background: rgba(0,0,0,0.4);
  display: none;
}
#drcalc-overlay.active { display: block; }

#drcalc-panel {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(420px, 85vw);
  z-index: 9982;
  background: #fff;
  box-shadow: 4px 0 24px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
#drcalc-panel.active { transform: translateX(0); }

#drcalc-header {
  background: #27ae60;
  color: #fff;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#drcalc-handle {
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.4);
  border-radius: 2px;
  margin: 0 auto 4px;
}
#drcalc-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
}
#drcalc-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  font-size: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
#drcalc-close:hover { background: rgba(255,255,255,0.3); }

#drcalc-frame {
  flex: 1;
  border: none;
  width: 100%;
}

/* ══════════════════════════════════════════════════════════════
   8. PUSH NOTIFICATION MODAL (creat de JS)
   ══════════════════════════════════════════════════════════════ */

#nm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
}
#nm-overlay.active { display: flex; }

#nm-dialog {
  background: #fff;
  border-radius: 14px;
  padding: 28px 24px;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  text-align: center;
}
#nm-dialog h3 { margin: 0 0 10px; font-size: 17px; color: var(--dark); }
#nm-dialog p { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0 0 18px; }

.nm-btn {
  display: inline-block;
  padding: 9px 22px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin: 0 4px;
  transition: transform 0.1s;
}
.nm-btn:hover { transform: scale(1.04); }
.nm-btn-yes { background: #27ae60; color: #fff; }
.nm-btn-no { background: #ecf0f1; color: #555; }

/* ══════════════════════════════════════════════════════════════
   9. BLOCK-LEVEL RATINGS (per sectiune)
   ══════════════════════════════════════════════════════════════ */

.block-rating-widget {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0 0;
  padding: 7px 12px;
  background: #0d1b2a;
  border: 1.5px solid #1a6fa8;
  border-radius: 0 0 6px 6px;
  border-top: none;
}

.block-rating-widget .br-type {
  font-size: 10px;
  font-weight: 700;
  color: #7ecfff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 110px;
}

.block-rating-widget .br-stars {
  display: flex;
  gap: 2px;
}

.block-rating-widget .br-star {
  font-size: 18px;
  cursor: pointer;
  color: #333;
  line-height: 1;
  user-select: none;
  transition: color 0.1s, transform 0.08s, text-shadow 0.1s;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}

.block-rating-widget .br-star:hover {
  transform: scale(1.22);
  color: #ff9900;
  text-shadow: 0 0 6px rgba(255, 153, 0, 0.7);
}

.block-rating-widget .br-star.active {
  color: #f5a623;
  text-shadow: 0 0 5px rgba(245, 166, 35, 0.6);
}

.block-rating-widget .br-info {
  font-size: 11px;
  color: #7ecfff;
}

.block-rating-widget .br-own {
  font-size: 10px;
  color: #aaa;
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 20px;
  background: #1a252f;
  border: 1px solid #2d5a7f;
  white-space: nowrap;
}

.block-rating-widget .br-own.voted {
  background: #1a6fa8;
  color: #fff;
  font-weight: 700;
  border-color: #1a6fa8;
}

/* Atom / aliniat / imagine — stele compacte */
.mnem-rating-atom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0;
  padding: 4px 8px;
  background: #152238;
  border: 1px solid #2d5a7f;
  border-radius: 4px;
  max-width: 100%;
}
.mnem-rating-atom .br-type {
  font-size: 9px;
  font-weight: 700;
  color: #8ecfff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 0;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mnem-rating-atom .br-stars { display: flex; gap: 0; }
.mnem-rating-atom .br-star {
  font-size: 13px;
  cursor: pointer;
  color: #333;
  line-height: 1;
  user-select: none;
  transition: color 0.1s, transform 0.08s;
}
.mnem-rating-atom .br-star:hover {
  transform: scale(1.15);
  color: #ff9900;
}
.mnem-rating-atom .br-star.active {
  color: #f5a623;
}
.mnem-rating-atom .br-info { display: none; }
.mnem-rating-atom .br-own {
  font-size: 9px;
  color: #9ab;
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 10px;
  background: #1a252f;
  border: 1px solid #2d5a7f;
  white-space: nowrap;
}
.mnem-rating-atom .br-own.voted {
  background: #1a6fa8;
  color: #fff;
  border-color: #1a6fa8;
  font-weight: 700;
}
figure.mnem-rating-figure-wrap { position: relative; }
figure .mnem-rating-atom { margin-top: 6px; }

#mnem-export-ratings-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9988;
  background: #2c3e50;
  color: #ecf0f1;
  border: 1px solid #34495e;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
#mnem-export-ratings-btn:hover { background: #34495e; }

/* ══════════════════════════════════════════════════════════════
   10. SUGGESTION WIDGET (per paragraf)
   ══════════════════════════════════════════════════════════════ */

.suggestion-widget {
  margin: 6px 16px 20px 16px;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px dashed #c08030;
  background: #0e0e0e;
}

.sw-toggle {
  width: 100%;
  text-align: left;
  padding: 9px 14px;
  background: #1c1200;
  border: none;
  color: #f5c060;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.02em;
  transition: background 0.15s;
}
.sw-toggle:hover { background: #261800; }

.sw-arrow {
  margin-left: 6px;
  transition: transform 0.2s;
  font-style: normal;
}
.suggestion-widget.sw-open .sw-arrow { transform: rotate(180deg); }

.sw-body {
  display: none;
  padding: 14px 16px 16px;
  border-top: 1px solid #2a1800;
}
.suggestion-widget.sw-open .sw-body { display: block; }

.sw-desc {
  font-size: 12px;
  color: #c0a060;
  margin: 0 0 14px 0;
  line-height: 1.6;
}

.sw-row { margin-bottom: 12px; }
.sw-row label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #f5a623;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sw-select, .sw-text {
  width: 100%;
  padding: 8px 10px;
  background: #1a1200;
  border: 1px solid #3a2800;
  border-radius: 5px;
  color: #e0d0a0;
  font-size: 12.5px;
  font-family: inherit;
}
.sw-select:focus, .sw-text:focus {
  outline: none;
  border-color: #f5a623;
  background: #221800;
}

.sw-text {
  resize: vertical;
  min-height: 70px;
  line-height: 1.5;
}

.sw-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.sw-submit {
  background: #f5a623;
  color: #1a1200;
  border: none;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.sw-submit:hover { background: #ff9900; transform: scale(1.03); }
.sw-submit:disabled { background: #666; cursor: not-allowed; }

.sw-status { font-size: 11px; color: #aaa; }

.sw-ai-hint {
  margin-top: 12px;
  padding: 10px;
  background: #0a0800;
  border-left: 3px solid #f5a623;
  font-size: 11px;
  color: #b0a060;
  line-height: 1.5;
  border-radius: 0 5px 5px 0;
}
.sw-ai-hint strong { color: #f5a623; }
.sw-ai-hint em { color: #d0c080; font-style: italic; }

.sw-copy-area {
  margin-top: 12px;
  padding: 10px;
  background: #0a0800;
  border-radius: 5px;
  border: 1px solid #3a2800;
}
.sw-copy-text {
  width: 100%;
  padding: 6px;
  background: #1a1200;
  border: 1px solid #2a1800;
  border-radius: 4px;
  font-size: 11px;
  color: #c0a060;
  font-family: monospace;
  resize: none;
}
.sw-copy-btn {
  background: #27ae60;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
}
.sw-copy-btn:hover { background: #229954; }

/* ══════════════════════════════════════════════════════════════
   11. TOAST NOTIFICATIONS
   ══════════════════════════════════════════════════════════════ */

#toast-global {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a252f;
  color: #fff;
  padding: 10px 22px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  z-index: 99997;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
#toast-global.show { opacity: 1; }

/* ══════════════════════════════════════════════════════════════
   12. RESPONSIVE (Mobile ≤ 640px)
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  .wrapper { padding: 16px 10px 50px; }
  .master-title { padding: 20px 16px; }
  .master-title h1 { font-size: 17px; }

  .nav-brand { max-width: 150px; font-size: 11px; }
  .nav-link { display: none; }

  .paragraf-title { font-size: 12.5px; padding: 9px 12px; }
  .box { padding: 10px 12px; margin: 8px 10px; }
  .ab-box { margin: 6px 10px; font-size: 11.5px; }
  .carlige-box { margin: 8px 10px; padding: 10px 12px; }

  .block-rating-widget { padding: 5px 8px; gap: 4px; }
  .block-rating-widget .br-star { font-size: 14px !important; }
  .block-rating-widget .br-type { font-size: 9px !important; min-width: 85px; }

  .suggestion-widget { margin: 6px 8px 16px 8px; }
  .sw-toggle { padding: 8px 12px; font-size: 11.5px; }
  .sw-body { padding: 12px; }

  #bookmark-fab { padding: 8px 12px; font-size: 12px; }
  #bookmark-fab .bm-text { display: none; }
  #bookmark-fab .bm-num { display: inline !important; }

  #drcalc-panel { width: 90vw; }
}

/* ══════════════════════════════════════════════════════════════
   13. PRINT (ascunde tot interactiv)
   ══════════════════════════════════════════════════════════════ */

@media print {
  nav, #bookmark-fab, #bk-toast, #notif-btn,
  #drcalc-tab, #drcalc-panel, #drcalc-overlay,
  #nm-overlay,
  .block-rating-widget, .mnem-rating-atom, .img-rating-widget,
  .suggestion-widget, #toast-global, #debug-panel, #mnem-export-ratings-btn { display: none !important; }
  .wrapper { max-width: 100%; padding: 0; }
  .paragraf { box-shadow: none; border: 1px solid #ddd; page-break-inside: avoid; }
  @page { margin: 14mm 12mm; }
}
