/* RSW Interner Bereich – nutzt die Farben und Schriften der Website */
.rsw-ib {
	--ib-navy: var(--rsw-navy, #1b1464);
	--ib-navy-2: var(--rsw-navy-2, #2b2386);
	--ib-accent: var(--rsw-orange, #f8921e);
	--ib-mist: var(--rsw-mist, #eef0f7);
	--ib-line: var(--rsw-line, #d3d7e6);
	--ib-ink: var(--rsw-ink, #191636);
	--ib-muted: var(--rsw-muted, #55576f);
	--ib-danger: #b3261e;
	--ib-radius: 12px;
	max-width: 880px;
	margin: 0 auto;
	color: var(--ib-ink);
	font-size: 1em;
}
.rsw-ib *, .rsw-ib *::before, .rsw-ib *::after { box-sizing: border-box; }
.rsw-ib h2, .rsw-ib h3 { margin: 0 0 .4em; }
.rsw-ib-muted { color: var(--ib-muted); margin: 0; }
.rsw-ib-hint { color: var(--ib-muted); font-size: .88em; margin: .45em 0 0; }

/* Karten */
.rsw-ib-card {
	background: #fff;
	border: 1px solid var(--ib-line);
	border-radius: var(--ib-radius);
	padding: clamp(1.1em, 3vw, 1.8em);
	margin: 0 0 1.5em;
	box-shadow: 0 1px 2px rgba(27, 20, 100, .04), 0 8px 24px -12px rgba(27, 20, 100, .12);
}

/* Buttons */
.rsw-ib-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .4em;
	background: var(--ib-navy); color: #fff !important; border: 2px solid var(--ib-navy);
	border-radius: 999px; padding: .6em 1.25em; font: inherit; font-weight: 700; line-height: 1.2;
	cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .15s;
}
.rsw-ib-btn:hover { background: var(--ib-navy-2); border-color: var(--ib-navy-2); }
.rsw-ib-btn:active { transform: translateY(1px); }
.rsw-ib-btn--ghost { background: #fff; color: var(--ib-navy) !important; }
.rsw-ib-btn--ghost:hover { background: var(--ib-mist); }
.rsw-ib-btn--big { padding: .8em 1.8em; font-size: 1.05em; }
.rsw-ib-btn--wide { width: 100%; margin-top: 1.2em; }
.rsw-ib-btn[disabled], .rsw-ib fieldset[disabled] .rsw-ib-btn { opacity: .55; cursor: not-allowed; }
.rsw-ib-link { background: none; border: 0; padding: 0; font: inherit; color: var(--ib-navy); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.rsw-ib-link--danger { color: var(--ib-danger); }

/* Meldungen */
.rsw-ib-msg { padding: .8em 1em; border-radius: 10px; margin: 0 0 1.2em; border-left: 4px solid; }
.rsw-ib-msg--ok { background: #e7f5ec; color: #0d5323; }
.rsw-ib-msg--warn { background: #fff4e0; color: #6b4400; }
.rsw-ib-msg--err { background: #fde8e7; color: #8c1d18; }
.rsw-ib-error { background: #fde8e7; color: #8c1d18; border-radius: 10px; padding: .8em 1em; margin: 1.2em 0 0; }

/* Passwortabfrage */
.rsw-ib-gate { padding: 2em 0; }
.rsw-ib-login { max-width: 420px; margin: 0 auto; text-align: left; }
.rsw-ib-login h2 { margin-top: .6em; }
.rsw-ib-login__icon {
	width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
	background: var(--ib-mist); color: var(--ib-navy); border: 2px solid var(--ib-accent);
}
.rsw-ib-login .rsw-ib-msg { margin-top: 1em; }

/* Formularfelder */
.rsw-ib label, .rsw-ib .rsw-ib-label { display: block; font-weight: 700; margin: 0 0 .35em; color: var(--ib-ink); }
.rsw-ib label.rsw-ib-btn { display: inline-flex; margin: .6em 0 0; color: var(--ib-navy); }
.rsw-ib label.rsw-ib-check { color: var(--ib-ink); }
.rsw-ib-field { margin: 1.2em 0 0; }
.rsw-ib input[type=text], .rsw-ib input[type=password], .rsw-ib input[type=date], .rsw-ib textarea, .rsw-ib select {
	width: 100%; padding: .65em .8em; border: 1.5px solid #8b8fa8; border-radius: 8px;
	font: inherit; color: inherit; background: #fff; min-height: 2.8em;
}
.rsw-ib input:focus-visible, .rsw-ib textarea:focus-visible { outline: 3px solid var(--ib-accent); outline-offset: 1px; border-color: var(--ib-navy); }
.rsw-ib textarea { resize: vertical; }
.rsw-ib fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.rsw-ib-group { border: 1px solid var(--ib-line) !important; border-radius: 10px; padding: 1em 1.2em 1.1em !important; margin: 1.5em 0 0 !important; }
.rsw-ib-group legend { font-weight: 700; padding: 0 .4em; color: var(--ib-navy); }
.rsw-ib-check { display: flex !important; align-items: center; gap: .55em; font-weight: 400 !important; margin: 1em 0 0 !important; cursor: pointer; }
.rsw-ib-check input { width: 1.2em; height: 1.2em; accent-color: var(--ib-navy); }
.rsw-ib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1em; }
@media (max-width: 600px) { .rsw-ib-grid { grid-template-columns: 1fr; } }
.rsw-ib-form [data-only] { display: none; }
.rsw-ib-form[data-type=post] [data-only=post], .rsw-ib-form[data-type=termin] [data-only=termin] { display: block; }
.rsw-ib-form[data-type=termin] .rsw-ib-grid[data-only=termin] { display: grid; }
.rsw-ib-form__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; }
.rsw-ib-form__actions { display: flex; align-items: center; gap: 1.5em; flex-wrap: wrap; margin-top: 1.6em; }

/* Datei-Buttons */
.rsw-ib-file { position: relative; overflow: hidden; margin: .6em 0 0; }
.rsw-ib-file input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.rsw-ib-file:focus-within { outline: 3px solid var(--ib-accent); outline-offset: 2px; }

/* Beitragsbild */
.rsw-ib-thumb { display: flex; gap: 1em; align-items: center; flex-wrap: wrap; }
.rsw-ib-thumb__preview { display: grid; gap: .3em; }
.rsw-ib-thumb__preview img { width: 220px; max-width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; display: block; border: 1px solid var(--ib-line); }
.rsw-ib-thumb__preview small { color: var(--ib-muted); }
.rsw-ib-thumb__actions { display: grid; gap: .6em; justify-items: start; }

/* Medienlisten */
.rsw-ib-media { list-style: none; margin: 0; padding: 0; display: grid; gap: .7em; }
.rsw-ib-media li { display: grid; grid-template-columns: 84px 1fr auto; gap: .9em; align-items: center; padding: .5em; border-radius: 10px; background: var(--ib-mist); }
.rsw-ib-media li.is-removed { opacity: .5; }
.rsw-ib-media li.is-removed input[type=text] { text-decoration: line-through; }
.rsw-ib-media img { width: 84px; height: 63px; object-fit: cover; border-radius: 6px; display: block; }
.rsw-ib-media small { display: block; color: var(--ib-muted); font-size: .82em; margin-top: .25em; }
.rsw-ib-media--pdf li { grid-template-columns: 52px 1fr auto; }
.rsw-ib-pdf-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 6px; background: #fff; color: var(--ib-danger); font-weight: 700; font-size: .8em; border: 1px solid var(--ib-line); }
.rsw-ib-media:empty { display: none; }

/* Editor */
.rsw-ib .wp-editor-wrap { border: 1.5px solid #8b8fa8; border-radius: 8px; overflow: hidden; }
.rsw-ib .wp-editor-container { border: 0 !important; }
.rsw-ib .mce-top-part::before { box-shadow: none !important; }
.rsw-ib .mce-toolbar-grp { background: var(--ib-mist) !important; border-bottom: 1px solid var(--ib-line) !important; }

/* Fortschritt */
.rsw-ib-progress { margin: 1.4em 0 0; }
.rsw-ib-progress__bar { height: 12px; border-radius: 999px; background: var(--ib-mist); overflow: hidden; border: 1px solid var(--ib-line); }
.rsw-ib-progress__bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ib-navy), var(--ib-navy-2)); border-radius: inherit; transition: width .2s ease; }
.rsw-ib-progress.is-processing .rsw-ib-progress__bar span { background-image: repeating-linear-gradient(45deg, var(--ib-navy) 0 12px, var(--ib-navy-2) 12px 24px); background-size: 34px 34px; animation: rsw-ib-stripes 1s linear infinite; }
.rsw-ib-progress.is-done .rsw-ib-progress__bar span { background: #1e7a3c; }
.rsw-ib-progress__text { margin: .5em 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
@keyframes rsw-ib-stripes { to { background-position: 34px 0; } }

/* Kopf + Listen */
.rsw-ib-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1em; flex-wrap: wrap; margin-bottom: 1.5em; }
.rsw-ib-head__actions { display: flex; gap: .6em; flex-wrap: wrap; }
.rsw-ib-list { list-style: none; margin: 0; padding: 0; }
.rsw-ib-list li { display: grid; grid-template-columns: 64px 1fr auto; gap: 1em; align-items: center; padding: .8em 0; border-bottom: 1px solid var(--ib-line); }
.rsw-ib-list li:last-child { border-bottom: 0; }
.rsw-ib-list__img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; display: block; }
.rsw-ib-list__img--empty { background: var(--ib-mist); }
.rsw-ib-list__body { display: grid; min-width: 0; }
.rsw-ib-list__body strong { overflow: hidden; text-overflow: ellipsis; }
.rsw-ib-list__body small { color: var(--ib-muted); }
.rsw-ib-list__actions { display: flex; gap: 1em; flex-wrap: wrap; justify-content: flex-end; }
.rsw-ib-list li.rsw-ib-list__empty { display: block; color: var(--ib-muted); }
@media (max-width: 600px) {
	.rsw-ib-list li { grid-template-columns: 56px 1fr; }
	.rsw-ib-list__actions { grid-column: 1 / -1; justify-content: flex-start; }
}
.rsw-ib.is-busy .rsw-ib-list { pointer-events: none; opacity: .6; }

@media (prefers-reduced-motion: reduce) {
	.rsw-ib *, .rsw-ib *::before, .rsw-ib *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Kontakt-/Chat-Bubbles auf dieser Seite ausblenden */
body.rsw-ib-page .joinchat, body.rsw-ib-page #joinchat, body.rsw-ib-page .wa__btn_popup, body.rsw-ib-page .wa__popup_chat_box,
body.rsw-ib-page .chaty, body.rsw-ib-page [id^="chaty"], body.rsw-ib-page #tidio-chat, body.rsw-ib-page .crisp-client,
body.rsw-ib-page #hubspot-messages-iframe-container, body.rsw-ib-page .tawk-min-container, body.rsw-ib-page [class*="whatsapp-float"],
body.rsw-ib-page .wpcf7-floating, body.rsw-ib-page .floating-contact, body.rsw-ib-page [class*="contact-bubble"],
body.rsw-ib-page [class*="chat-bubble"], body.rsw-ib-page .buttonizer, body.rsw-ib-page #buttonizer-buttons {
	display: none !important;
}
