/* ==========================================================================
   IB Artikelversendung – Formular, Teaser-Box und Pop-up
   Optik angelehnt an die infoboard Newsletter-Box (phpList)
   ========================================================================== */

:root {
	--ibau-primary: #ff6600;
	--ibau-link: #3f51b5;
	--ibau-link-hover: #2c397f;
	--ibau-overlay: rgba(0, 0, 0, 0.85);
	--ibau-text: #333333;
}

.ibau { font-family: Arial, Helvetica, sans-serif; color: var(--ibau-text); }
.ibau--inline {
	max-width: 640px; margin: 40px auto; padding: 35px; background: #fff; border-radius: 10px;
	border: 1px solid #e0e0e0; border-top: 4px solid var(--ibau-primary); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
	box-sizing: border-box;
}
.ibau-title, .ibau-modal__title {
	margin: 0 0 10px; font-size: 24px; color: var(--ibau-text); padding-bottom: 10px; border-bottom: 2px solid #eee; line-height: 1.25;
	font-family: Arial, Helvetica, sans-serif; font-weight: bold; letter-spacing: 0;
}
.ibau-modal__intro { font-size: 14px; color: #666; line-height: 1.5; margin: 0 0 20px; }
.ibau-legend { margin: 14px 0 10px; font-size: 14px; font-weight: bold; color: #555; }

/* --- Formular --- */
.ibau-form { display: block; margin: 0; }
.ibau-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 15px; }
.ibau-field { margin: 0 0 14px; }
.ibau-field--full { grid-column: 1 / -1; }
.ibau-field label { display: block; font-size: 13px; font-weight: bold; color: #555; margin-bottom: 4px; }
.ibau-field input[type="text"], .ibau-field input[type="email"], .ibau-field input[type="tel"], .ibau-field select {
	width: 100%; box-sizing: border-box; padding: 12px 15px; border: 1px solid #ccc; border-radius: 5px;
	font-size: 15px; font-family: inherit; background: #fff; color: #333; margin: 0;
	transition: border-color .3s ease, box-shadow .3s ease;
}
.ibau-field select {
	appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
	background-repeat: no-repeat; background-position: right 15px center; background-size: 15px;
}
.ibau-field input:focus, .ibau-field select:focus {
	outline: none; border-color: var(--ibau-primary); box-shadow: 0 0 5px rgba(255, 102, 0, 0.3);
}
.ibau-field input[disabled] { background: #f3f3f3; color: #555; }

.ibau-fieldset { border: 1px solid #e0e0e0; border-radius: 5px; padding: 10px 15px 12px; margin: 0 0 15px; min-width: 0; }
.ibau-fieldset legend { font-size: 14px; font-weight: bold; color: #555; padding: 0 6px; }
.ibau-radio, .ibau-check { display: block; margin: 6px 0; font-size: 14px; cursor: pointer; line-height: 1.4; }
.ibau-radio input, .ibau-check input { margin: 0 6px 0 0; accent-color: var(--ibau-primary); }
.ibau-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 15px; }

.ibau-field--check { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 14px; }
.ibau-field--check input { margin-top: 3px; flex: none; cursor: pointer; accent-color: var(--ibau-primary); }
.ibau-field--check label { font-size: 13px; font-weight: normal; color: #555; line-height: 1.4; cursor: pointer; margin: 0; }
.ibau-field--check a, .ibau-textlink { color: var(--ibau-link); font-weight: bold; text-decoration: none; transition: color .3s ease; }
.ibau-field--check a:hover, .ibau-textlink:hover { color: var(--ibau-link-hover); text-decoration: underline; }

.ibau-small { font-size: 12px; color: #777; line-height: 1.45; margin: 4px 0 12px; }
.ibau-loader { margin: 12px 0 0; font-size: 13px; color: #666; text-align: center; font-style: italic; }

/* --- Buttons --- */
.ibau-button {
	background: var(--ibau-primary); color: #fff; border: none; padding: 12px 24px; font-size: 16px; font-weight: bold;
	border-radius: 5px; cursor: pointer; text-transform: uppercase; letter-spacing: .5px; font-family: inherit;
	transition: filter .3s ease, transform .1s ease;
}
.ibau-button:hover, .ibau-button:focus-visible { filter: brightness(0.85); }
.ibau-button:active { transform: scale(0.98); }
.ibau-button:disabled { background: #ccc; cursor: not-allowed; transform: none; filter: none; }
.ibau-submit { width: 100%; }
.ibau-button--danger { background: #b32d2e; }
.ibau-link { background: none; border: 0; padding: 0; color: #b32d2e; text-decoration: underline; cursor: pointer; font-size: 13px; }
.ibau-unsub { margin-top: 16px; text-align: center; }
.ibau-actions { margin: 16px 0 0; }
.ibau-actions .ibau-button { width: 100%; }

/* --- Meldungen --- */
.ibau-notice { padding: 12px 14px; border-radius: 5px; margin: 0 0 15px; font-size: 14px; line-height: 1.5; background: #f0f6fc; border: 1px solid #c5d9ed; }
.ibau-notice ul { margin: 0; padding-left: 18px; }
.ibau-notice--ok { background: #d4edda; color: #155724; border-color: #c3e6cb; }
.ibau-notice--error { background: #f8d7da; color: #721c24; border-color: #f5c6cb; }
.ibau-box { padding: 14px; border: 1px solid #f5c6cb; border-radius: 5px; margin-bottom: 20px; background: #fff8f8; }
.ibau-box form { margin: 0; }
.ibau-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* --- Teaser-Box --- */
.ibau-teaser {
	background: #f9f9f9; border: 1px solid #ccc; border-top: 4px solid var(--ibau-primary); padding: 25px; border-radius: 8px;
	text-align: center; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); max-width: 600px; margin: 20px auto; font-family: Arial, Helvetica, sans-serif;
}
.ibau-teaser h3 { margin: 0 0 10px; color: var(--ibau-text); font-size: 22px; font-family: inherit; letter-spacing: 0; }
.ibau-teaser p { color: #555; font-size: 15px; line-height: 1.5; margin: 0 0 20px; }

/* --- Pop-up --- */
html.ibau-lock { overflow: hidden; }
.ibau-modal {
	position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center;
	background: var(--ibau-overlay); opacity: 0; transition: opacity .25s ease; padding: 16px; box-sizing: border-box;
}
.ibau-modal[hidden] { display: none; }
.ibau-modal.is-open { opacity: 1; }
.ibau-modal__box {
	background: #fff; padding: 35px; border-radius: 10px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px);
	overflow-y: auto; position: relative; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); box-sizing: border-box;
	transform: translateY(10px); transition: transform .25s ease;
}
.ibau-modal.is-open .ibau-modal__box { transform: none; }
.ibau-modal__close {
	position: absolute; top: 12px; right: 16px; background: none; border: 0; color: #999; font-size: 30px; font-weight: bold;
	line-height: 1; cursor: pointer; padding: 4px; transition: color .3s ease;
}
.ibau-modal__close:hover, .ibau-modal__close:focus-visible { color: var(--ibau-primary); }
.ibau-modal__logo { text-align: center; margin: 0 0 20px; }
.ibau-modal__logo img { max-width: 200px; height: auto; display: inline-block; }

@media (max-width: 600px) {
	.ibau-grid { grid-template-columns: 1fr; }
	.ibau-field--spacer { display: none; }
	.ibau--inline, .ibau-modal__box { padding: 24px 18px; }
	.ibau-title, .ibau-modal__title { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
	.ibau-modal, .ibau-modal__box { transition: none; }
}
.ibau [hidden], .ibau-modal__box [hidden] { display: none !important; }
