
/* Reisekasse Newsfeed Pro – UI */
:root{
  --rk-nf-bg: rgba(15,23,42,0.65);
  --rk-nf-bg2: rgba(17,24,39,0.92);
  --rk-nf-border: rgba(148,163,184,0.20);
  --rk-nf-text: rgba(241,245,249,0.94);
  --rk-nf-muted: rgba(203,213,225,0.75);
  --rk-nf-shadow: 0 20px 55px rgba(0,0,0,0.35);

  /* Accent (default: cool ocean) */
  --rk-nf-accent1: #22c55e; /* mint */
  --rk-nf-accent2: #3b82f6; /* ocean */
  --rk-nf-accent3: #f59e0b; /* sun */
}

/* Light mode (only if enabled via JS class) */
body.rk-nf-theme-light{
  --rk-nf-bg: rgba(255,255,255,0.78);
  --rk-nf-bg2: rgba(255,255,255,0.92);
  --rk-nf-border: rgba(15,23,42,0.12);
  --rk-nf-text: rgba(15,23,42,0.92);
  --rk-nf-muted: rgba(15,23,42,0.62);
  --rk-nf-shadow: 0 18px 50px rgba(2,6,23,0.10);
}

/* Vacation palette (enabled via JS class) */
body.rk-nf-vacation{
  --rk-nf-accent1: #10b981; /* emerald */
  --rk-nf-accent2: #0ea5e9; /* sky */
  --rk-nf-accent3: #f97316; /* sunset */
}

.rk-nf-wrap{ max-width: 1120px; margin: 22px auto; padding: 0 12px; }

.rk-nf-topbar{
  display:flex; gap: 12px; align-items:center; justify-content: space-between;
  padding: 12px; border-radius: 18px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--rk-nf-accent2) 22%, transparent),
    color-mix(in srgb, var(--rk-nf-accent3) 14%, transparent)
  ), var(--rk-nf-bg);
  border: 1px solid var(--rk-nf-border);
  box-shadow: var(--rk-nf-shadow);
  margin-bottom: 14px; flex-wrap: wrap;
}

.rk-nf-filters{ display:flex; gap: 10px; flex-wrap: wrap; }

.rk-nf-chip{
  display:inline-flex; align-items:center; gap: 8px;
  padding: 10px 12px; border-radius: 999px;
  border: 1px solid var(--rk-nf-border);
  background: rgba(2,6,23,0.35);
  color: var(--rk-nf-text);
  text-decoration:none;
  font-weight: 800; font-size: 13px;
}
.rk-nf-chip.is-active{
  background: linear-gradient(135deg, rgba(59,130,246,0.75), rgba(139,92,246,0.75));
  border-color: rgba(255,255,255,0.15);
}

.rk-nf-search{ display:flex; gap: 8px; align-items:center; flex: 1; min-width: min(520px, 100%); justify-content: flex-end; }
.rk-nf-search input[type="search"]{
  flex: 1; min-width: 220px;
  padding: 10px 12px; border-radius: 999px;
  border: 1px solid var(--rk-nf-border);
  background: rgba(2,6,23,0.35);
  color: var(--rk-nf-text);
  outline: none;
}
.rk-nf-search button{
  padding: 10px 14px; border-radius: 999px;
  border: 1px solid rgba(59,130,246,0.35);
  background: linear-gradient(135deg, rgba(59,130,246,0.92), rgba(139,92,246,0.92));
  color: #fff; font-weight: 900; cursor: pointer;
}

.rk-nf-card{ padding: 14px 16px; border-radius: 18px; border: 1px solid var(--rk-nf-border); background: var(--rk-nf-bg2); color: var(--rk-nf-text); }

/* Rich Card */
.rk-nf-richcard{ margin-top: 12px; padding: 12px; border-radius: 16px; border: 1px solid var(--rk-nf-border); background: rgba(2,6,23,0.35); }
.rk-nf-rich-top{ display:flex; align-items:center; justify-content: space-between; gap: 10px; }
.rk-nf-rich-title{ font-weight: 900; color: var(--rk-nf-text); }
.rk-nf-rich-rating{ padding: 6px 10px; border-radius: 999px; background: rgba(59,130,246,0.18); border: 1px solid rgba(59,130,246,0.28); color: var(--rk-nf-text); font-weight: 900; font-size: 12px; }
.rk-nf-rich-loc{ margin-top: 6px; color: var(--rk-nf-muted); font-weight: 700; font-size: 12px; }
.rk-nf-rich-gallery{ margin-top: 10px; display:grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 640px){ .rk-nf-rich-gallery{ grid-template-columns: repeat(2, 1fr); } }
.rk-nf-rich-img{ display:block; border-radius: 14px; overflow:hidden; border: 1px solid rgba(148,163,184,0.18); }
.rk-nf-rich-img img{ width: 100%; height: 120px; object-fit: cover; display:block; }
.rk-nf-rich-actions{ margin-top: 10px; display:flex; gap: 10px; flex-wrap: wrap; }
.rk-nf-btn{ display:inline-flex; align-items:center; justify-content:center; padding: 9px 12px; border-radius: 999px; border: 1px solid rgba(148,163,184,0.22); background: rgba(2,6,23,0.35); color: var(--rk-nf-text); font-weight: 900; cursor: pointer; text-decoration:none; }

/* ===== Postbox Popup / Toast ===== */
.rk-nf-pb-fab{
  position: fixed; right: 18px; bottom: 18px; z-index: 99999;
  padding: 12px 14px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--rk-nf-accent2) 45%, transparent);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--rk-nf-accent2) 92%, #000),
    color-mix(in srgb, var(--rk-nf-accent3) 92%, #000)
  );
  color: #fff; font-weight: 900; box-shadow: var(--rk-nf-shadow);
  cursor: pointer; display: none; user-select: none;
}
.rk-nf-pb-fab:active{ transform: translateY(1px); }

.rk-nf-pb-overlay{ position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 99998; display: none; }

.rk-nf-pb-modal{
  position: fixed; right: 14px; bottom: 14px;
  width: min(640px, calc(100vw - 28px)); max-height: min(86vh, 720px);
  z-index: 99999; display: none;
  background: var(--rk-nf-bg2); border: 1px solid var(--rk-nf-border);
  border-radius: 22px; box-shadow: 0 22px 70px rgba(0,0,0,0.35);
  overflow: hidden;
}
@media (max-width: 560px) {
  .rk-nf-pb-modal{ right: 10px; bottom: 10px; width: calc(100vw - 20px); max-height: 90vh; border-radius: 20px; }
}

/* Optional: Fullscreen Composer on mobile */
@media (max-width: 560px) {
  body.rk-nf-mobile-fullscreen .rk-nf-pb-modal{
    inset: 0; right: 0; bottom: 0;
    width: 100vw; max-height: 100vh; height: 100vh;
    border-radius: 0;
  }
  body.rk-nf-mobile-fullscreen .rk-nf-pb-head{
    position: sticky; top: 0; z-index: 2;
    padding: 14px 14px;
  }
  body.rk-nf-mobile-fullscreen .rk-nf-pb-body{ padding: 14px; }
}

.rk-nf-pb-head{
  display:flex; align-items:center; justify-content: space-between; gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--rk-nf-accent2) 18%, transparent),
    color-mix(in srgb, var(--rk-nf-accent3) 14%, transparent)
  );
  border-bottom: 1px solid var(--rk-nf-border);
}
.rk-nf-pb-title{ font-weight: 900; color: var(--rk-nf-text); }
.rk-nf-pb-close{
  width: 38px; height: 38px; display:grid; place-items:center;
  border-radius: 12px; border: 1px solid var(--rk-nf-border);
  background: rgba(2,6,23,0.35); color: var(--rk-nf-text);
  cursor: pointer; font-weight: 900;
}

.rk-nf-pb-body{ padding: 12px; overflow: auto; max-height: calc(86vh - 60px); }

/* Youzify Form im Modal – kompakt ohne Layout zu brechen */
.rk-nf-pb-body #youzify-wall-form{ margin: 0 !important; }
.rk-nf-pb-body .youzify-wall-actions{ position: sticky; bottom: 0; background: var(--rk-nf-bg2); padding-bottom: 10px; }

/* Hide original postbox when popup mode is enabled */
body.rk-nf-postbox-popup #youzify-wall-form{ display:none !important; }
body.rk-nf-postbox-popup #rk-nf-pb-modal #youzify-wall-form{ display:block !important; }

/* --- AI panel + Location bar (non-destructive enhancements) --- */
.rk-nf-ai-btn{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--rk-nf-border);
  background: color-mix(in srgb, var(--rk-nf-bg2) 70%, transparent);
  color: var(--rk-nf-text);
  font-weight: 900;
  cursor: pointer;
}
.rk-nf-ai-btn:hover{ transform: translateY(-1px); }

.rk-nf-ai-panel{
  margin: 10px 0 12px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--rk-nf-border);
  background: color-mix(in srgb, var(--rk-nf-bg2) 78%, transparent);
}
.rk-nf-ai-row{ display:flex; flex-wrap:wrap; gap: 8px; }
.rk-nf-ai-action{
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--rk-nf-accent2) 28%, transparent);
  background: color-mix(in srgb, var(--rk-nf-accent2) 18%, transparent);
  color: var(--rk-nf-text);
  font-weight: 900;
  cursor:pointer;
}
.rk-nf-ai-action:hover{
  border-color: color-mix(in srgb, var(--rk-nf-accent2) 40%, transparent);
  transform: translateY(-1px);
}
.rk-nf-ai-status{ margin-top: 8px; color: var(--rk-nf-muted); font-weight: 800; }

.rk-nf-placebar{
  margin: 10px 0 12px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--rk-nf-border);
  background: color-mix(in srgb, var(--rk-nf-bg2) 78%, transparent);
}
.rk-nf-place-title{ font-weight: 900; color: var(--rk-nf-text); margin-bottom: 8px; }
.rk-nf-place-input{
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--rk-nf-border);
  background: rgba(2,6,23,0.35);
  color: var(--rk-nf-text);
}
body.rk-nf-theme-light .rk-nf-place-input{ background: rgba(255,255,255,0.85); }
.rk-nf-place-suggest{ margin-top: 8px; display:flex; flex-direction:column; gap: 6px; }
.rk-nf-place-item{
  text-align:left;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--rk-nf-border);
  background: rgba(2,6,23,0.35);
  color: var(--rk-nf-text);
  cursor:pointer;
}
.rk-nf-place-item:hover{ border-color: color-mix(in srgb, var(--rk-nf-accent3) 38%, transparent); }


/* ===== Popup Composer – aufgeräumter "Composer" ===== */
.rk-nf-pb-tools{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.22);
  background: rgba(2,6,23,0.35);
  color: var(--rk-nf-text);
  font-weight: 900;
  cursor: pointer;
}
.rk-nf-pb-tools:active{ transform: translateY(1px); }

#rk-nf-pb-modal.rk-nf-tools-open .rk-nf-pb-tools{
  background: rgba(59,130,246,0.18);
  border-color: rgba(59,130,246,0.35);
}

/* Standard: Optionen & "Post in" ausblenden (entlastet UI) */
body.rk-nf-postbox-popup #rk-nf-pb-modal .youzify-wall-options{ display:none !important; }
body.rk-nf-postbox-popup #rk-nf-pb-modal:not(.rk-nf-tools-open) #whats-new-post-in-box{ display:none !important; }

/* Wenn Tools offen: Optionen als kompakte Toolbar */
body.rk-nf-postbox-popup #rk-nf-pb-modal.rk-nf-tools-open .youzify-wall-options{
  display:flex !important;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(2,6,23,0.25);
}

body.rk-nf-postbox-popup #rk-nf-pb-modal .youzify-wall-options .youzify-wall-opts-item{ margin: 0 !important; }
body.rk-nf-postbox-popup #rk-nf-pb-modal .youzify-wall-options .youzify-btn{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(2,6,23,0.35);
}

/* Textarea: wie moderner Composer */
body.rk-nf-postbox-popup #rk-nf-pb-modal #whats-new-content{
  padding: 10px 10px 6px !important;
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,0.14);
  background: rgba(2,6,23,0.25);
}
body.rk-nf-postbox-popup #rk-nf-pb-modal #whats-new{
  min-height: 140px;
  border-radius: 16px !important;
  border: 1px solid rgba(148,163,184,0.18) !important;
  background: rgba(2,6,23,0.25) !important;
  color: var(--rk-nf-text) !important;
  padding: 12px 12px !important;
}

/* Footer-Tools & Post-Button kompakter und "luftiger" */
body.rk-nf-postbox-popup #rk-nf-pb-modal .youzify-wall-actions{
  margin-top: 10px !important;
  padding-top: 10px !important;
  border-top: 1px solid rgba(148,163,184,0.14);
}
body.rk-nf-postbox-popup #rk-nf-pb-modal .youzify-form-tools{
  padding: 8px 10px !important;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,0.14);
  background: rgba(2,6,23,0.18);
}
body.rk-nf-postbox-popup #rk-nf-pb-modal .youzify-posting-form-actions{ padding: 8px 10px !important; }
body.rk-nf-postbox-popup #rk-nf-pb-modal .youzify-wall-post{
  border-radius: 999px !important;
  padding: 10px 16px !important;
  font-weight: 900 !important;
}

@media (max-width: 560px){
  body.rk-nf-postbox-popup #rk-nf-pb-modal #whats-new{ min-height: 120px; }
}


/* ===== Tabs in Popup ===== */
.rk-nf-pb-head{
  flex-wrap: wrap;
}
.rk-nf-pb-headline{
  display:flex; align-items:center; gap: 10px; flex: 1;
  min-width: 220px;
}
.rk-nf-pb-avatar{
  width: 30px; height: 30px; border-radius: 999px; overflow:hidden;
  border: 1px solid rgba(148,163,184,0.25);
  background: rgba(2,6,23,0.35);
  flex: 0 0 auto;
}
.rk-nf-pb-avatar img{ width:100%; height:100%; object-fit: cover; display:block; }

.rk-nf-pb-tabs{
  width: 100%;
  display:flex; gap: 8px; flex-wrap: wrap;
  padding: 10px 0 2px;
}
.rk-nf-pb-tab{
  appearance: none;
  border: 1px solid rgba(148,163,184,0.22);
  background: rgba(2,6,23,0.35);
  color: var(--rk-nf-text);
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 900;
  cursor: pointer;
}
.rk-nf-pb-tab.is-active{
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--rk-nf-accent2) 86%, #000),
    color-mix(in srgb, var(--rk-nf-accent3) 86%, #000)
  );
  border-color: rgba(255,255,255,0.18);
}
.rk-nf-pb-tab:active{ transform: translateY(1px); }

/* Author-Avatar im Body entfernen (wir zeigen ihn im Header) */
body.rk-nf-postbox-popup #rk-nf-pb-modal .youzify-wall-author{ display:none !important; }
/* Etwas mehr Luft zwischen Tabs und Textfeld */
body.rk-nf-postbox-popup #rk-nf-pb-modal #whats-new-content{ margin-top: 8px !important; }
