/* =========================================================
   🔹 BASISLAYOUT & GLOBALS
   ========================================================= */
body {
  font-family: "Inter", sans-serif;
  background: #f8fafc;
  margin: 0;
  padding: 0;
}

body.no-scroll {
  overflow: hidden;
}

input,
button {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 1rem;
}

button {
  background-color: #2563eb;
  color: white;
  border: none;
  cursor: pointer;
  margin-left: 0.5rem;
  transition: all 0.3s ease;
}

button:hover {
  background-color: #1e40af;
}

/* =========================================================
   🔹 HEADER & NAVIGATION
   ========================================================= */
.app-header {
  position: sticky;
  top: 0;
  height: 2rem;
  background: #2563eb;
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 100;
}

.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* Menü-Button – oben rechts fixiert */
.menu-btn {
  position: absolute;      
  top: 50%;                
  transform: translateY(-50%);
  right: 16px;
  background: #2563eb;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 200;
  transition: background 0.3s ease;
}


.menu-btn:hover {
  background: #1e40af;
}

/* =========================================================
   🔹 SIDEPANEL (Menü rechts)
   ========================================================= */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 98;
}

.side-panel {
  position: fixed;
  top: 1;
  right: 0;
  width: 200px;
  height: 100%;
  background: #fff;
  box-shadow: -3px 0 8px rgba(0,0,0,0.3);
  transform: translateX(100%);
  transition: transform 0.35s ease-in-out;
  z-index: 99;
  padding: 30px 20px 20px 20px;
}

.side-panel.open {
  transform: translateX(0);
}

.side-panel h2 {
  margin-top: 15px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 8px;
}

.side-panel ul {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.side-panel li {
  margin: 15px 0;
}

.side-panel a {
  color: #1e1e2f;
  text-decoration: none;
  font-weight: 500;
}

.side-panel a:hover {
  color: #007bff;
}

/* =========================================================
 🔹 KEYWORD-BEREICH
 ========================================================= */
.box {
  background-color: white;
  max-width: 500px;
  margin: 2rem auto;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#savedKeywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.8rem;   /* mehr Abstand */
}


/* Keyword-Box */
.keyword-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  background-color: #3b82f6;
  color: white;
  padding: 0.5rem 1.8rem 0.5rem 1rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.keyword-box.keyword-empty {
  background-color: #cccccc !important;
  color: #333;
  border-color: #b5b5b5;
}

.keyword-box button.remove_keyword {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: #ced8f2;
  border: none;
  color: white;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
  display: none;
  z-index: 10;
}

.keyword-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0rem; /* Abstand nach oben (Eingabe → Überschrift) */
}



/* Edit-Button */
.edit-btn {
  margin-left: 10px;
  padding: 4px 10px;
  font-size: 1.4rem;    /* größer für die Punkte */
  font-weight: bold;
  background: transparent;
  color: #475569;
  border-radius: 6px;
  border: none;         /* wirkt wie Icon statt Button */
  cursor: pointer;
}

.edit-btn:hover {
  background: #e2e2e2;
}

.edit-btn.editing {
  background: #d1d5db;  /* leichtes Highlight wenn aktiv */
  color: #111;
}


/* Keyword Jump Highlight */
.summary-box.highlighted {
  animation: flashHighlight 1.4s ease-out;
}

@keyframes flashHighlight {
  0%   { box-shadow: 0 0 0 rgba(255,200,0,0.9); border-color: #ffd43b; }
  30%  { box-shadow: 0 0 12px rgba(255,200,0,0.9); border-color: #ffbf00; }
  100% { box-shadow: 0 0 0 rgba(255,200,0,0); border-color: #e2e2e2; }
}

/* =========================================================
   🔹 NEWSBEREICH (AKTUELLES SYSTEM)
   ========================================================= */

.summary-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* --- Keyword Summary Box --- */
.summary-box {
  background: #ffffff;
  border-radius: 10px;
  padding: 18px 22px;
  border: 1px solid #e2e2e2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  position: relative;
  transition: all 0.2s ease;
}

.summary-box.expanded {
  border-color: #007bff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* --- Header --- */
.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

/* Menü-Button */
.menu-button {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  color: #555;
  transition: background 0.15s;
}

.menu-button:hover {
  background: #f1f1f1;
}

/* Extra Bereich */
.summary-extra {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

/* Expand Button */
.expand-button {
  width: 100%;
  background: #f5f5f5;
  color: #333;
  border: none;
  padding: 10px 0;
  margin-top: 12px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.expand-button:hover {
  background: #e1e1e1;
}

.summary-box.expanded .expand-button {
  background: #007bff;
  color: white;
}

/* Quellenliste */
.summary-extra ul.sources {
  list-style: none;
  padding: 0;
  margin-top: 12px;
  background: #fafafa;
  border-radius: 6px;
  border-left: 3px solid #ccc;
}

.summary-extra ul.sources li {
  padding: 10px 12px;
  border-bottom: 1px solid #e1e1e1;
}

.summary-extra ul.sources li:last-child {
  border-bottom: none;
}

.summary-extra .src-summary {
  font-size: 0.85rem;
  color: #555;
  margin-top: 4px;
}

.summary-toggle-container {
    width: 100%;
    text-align: center;
    margin: 20px 0;
}

.summary-toggle-btn {
    background: #444;
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s ease;
}

.summary-toggle-btn:hover {
    background: #666;
}

.source-list {
    margin-top: 10px;
    display: none;
}



/* =========================================================
   🔹 LINKS (Login/Register)
   ========================================================= */
.login-link,
.register-link,
.forgot-link {
  display: block;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.login-link,
.register-link a,
.forgot-link a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.login-link:hover,
.register-link a:hover,
.forgot-link a:hover {
  text-decoration: underline;
}

/* Passwort Toggle Button – Hover NICHT farbig machen */
.pw-toggle-btn {
    background: none !important;
    border: none !important;
    padding: 0 5px;
    cursor: pointer;
    outline: none !important;
}

/* Hover und Fokus sollen NICHTs verändern */
.pw-toggle-btn:hover,
.pw-toggle-btn:focus,
.pw-toggle-btn:active {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Optional: SVG Farbe beim Hover leicht abdunkeln (falls du es willst) */
.pw-toggle-btn:hover svg {
    stroke: #333;  /* nur minimale Reaktion, kein Blau */
}
