/**
 * AIC Ad Manager — frontend slot fit.
 *
 * Two cases, kept deliberately separate:
 *
 * 1. Fluid slots (no Width/Height set on the slot) — the common case.
 *    The creative should render at its own full natural width, exactly as
 *    if there were no wrapper at all. We only stop it overflowing the page
 *    horizontally; we never touch height, so a full-width banner never gets
 *    height-capped or shrunk down.
 *
 * 2. Fixed slots (Width AND Height both set) — e.g. a 300x250 unit. Here we
 *    actually want to fit/clip the creative inside that box, so it scales
 *    down proportionally instead of overflowing or breaking layout.
 */

.aicadm-slot {
	box-sizing: border-box;
}

/* Fluid: full natural width, untouched height. */
.aicadm-slot-fluid img,
.aicadm-slot-fluid iframe,
.aicadm-slot-fluid ins,
.aicadm-slot-fluid video,
.aicadm-slot-fluid embed,
.aicadm-slot-fluid object {
	max-width: 100%;
	height: auto;
}

/* Fixed: clip to the slot's box, scale creative down to fit inside it. */
.aicadm-slot-fixed {
	overflow: hidden;
}

.aicadm-slot-fixed img,
.aicadm-slot-fixed iframe,
.aicadm-slot-fixed ins,
.aicadm-slot-fixed video,
.aicadm-slot-fixed embed,
.aicadm-slot-fixed object {
	max-width: 100%;
	max-height: 100%;
}

/* AdSense's <ins class="adsbygoogle"> often gets inline width/height from
   Google's own script after it renders; this keeps it centered and capped
   at the slot's width even then. */
.aicadm-slot ins.adsbygoogle {
	display: inline-block !important;
	max-width: 100% !important;
}

/* Report-ad: three-dot button menu + dialog (printed once per page). */
.aicadm-report-btn:hover,
.aicadm-report-btn:focus-visible {
	background: #fff !important;
	color: #111 !important;
}
.aicadm-r-menu {
	position: fixed;
	z-index: 100000;
	min-width: 150px;
	padding: 4px 0;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 6px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.aicadm-r-item {
	display: block;
	width: 100%;
	padding: 8px 14px;
	margin: 0;
	text-align: left;
	font-size: 14px;
	line-height: 1.3;
	color: #222;
	background: none;
	border: 0;
	border-radius: 0;
	cursor: pointer;
}
.aicadm-r-item:hover,
.aicadm-r-item:focus-visible {
	background: #f3f4f6;
}
.aicadm-r-overlay {
	position: fixed;
	inset: 0;
	z-index: 100001;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.5);
}
.aicadm-r-dialog {
	box-sizing: border-box;
	width: 100%;
	max-width: 400px;
	max-height: 100%;
	overflow-y: auto;
	padding: 20px;
	background: #fff;
	color: #222;
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
	font-size: 14px;
	text-align: left;
}
.aicadm-r-dialog h3 {
	margin: 0 0 12px;
	font-size: 18px;
	color: #111;
}
.aicadm-r-opts {
	margin-bottom: 10px;
}
.aicadm-r-opt {
	display: block;
	padding: 5px 0;
	cursor: pointer;
}
.aicadm-r-dialog textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 8px;
	font: inherit;
	border: 1px solid #ccc;
	border-radius: 4px;
	resize: vertical;
}
.aicadm-r-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
}
.aicadm-r-msg {
	min-height: 18px;
	margin: 8px 0 0;
	font-size: 13px;
}
.aicadm-r-ok { color: #0a6b2d; }
.aicadm-r-err { color: #b32d2e; }
.aicadm-r-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 12px;
}
.aicadm-r-btn {
	padding: 8px 14px;
	font-size: 14px;
	line-height: 1.2;
	color: #222;
	background: #f3f4f6;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	cursor: pointer;
}
.aicadm-r-primary {
	color: #fff;
	background: #1d4ed8;
	border-color: #1d4ed8;
}
.aicadm-r-btn:disabled {
	opacity: 0.6;
	cursor: default;
}
