/* =========================
   Giggle This (captions)
========================= */
.ag-giggle-this {
	--ag-caption-row-height: 3.5rem;
	width: 100%;
	max-width: 36rem;
	margin: 1.25rem auto 0;
	padding: 1rem;
	border-radius: 12px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	box-sizing: border-box;
}

.ag-giggle-this.is-disabled {
	/*opacity: 0.55;*/
	/*pointer-events: none;*/
}

.ag-giggle-this__heading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin: 0 0 0.75rem;
	font-size: 1.25rem;
	font-weight: 600;
	color: #1e293b;
}

.ag-giggle-this__info {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 50%;
	background: #cbd5e1;
	color: #334155;
	font-size: 0.75rem;
	font-weight: 700;
	font-style: normal;
	cursor: help;
	flex-shrink: 0;
}

.ag-giggle-this__info::before {
	content: 'i';
	line-height: 1;
}

.ag-giggle-this__info::after {
	content: "All 'Giggle This' submissions take 1-3 days to be approved.";
	position: absolute;
	left: 50%;
	bottom: calc(100% + 8px);
	transform: translateX(-50%);
	width: min(16rem, 70vw);
	padding: 0.5rem 0.65rem;
	border-radius: 8px;
	background: #1e293b;
	color: #f8fafc;
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 1.35;
	text-align: center;
	white-space: normal;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.15s ease, visibility 0.15s ease;
	z-index: 10;
}

.ag-giggle-this__info:hover::after,
.ag-giggle-this__info:focus::after,
.ag-giggle-this__info:focus-visible::after {
	opacity: 1;
	visibility: visible;
}

.ag-giggle-this__list {
	min-height: 4rem;
	max-height: calc(3 * var(--ag-caption-row-height));
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	margin-bottom: 1rem;
	padding: 0.25rem 0.5rem;
	border-radius: 8px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
}

.ag-giggle-this__caption {
	min-height: var(--ag-caption-row-height);
	margin: 0;
	padding: 0.65rem 0.5rem;
	font-size: 0.95rem;
	line-height: 1.4;
	color: #334155;
	word-break: break-word;
	border-bottom: 1px solid #f1f5f9;
	box-sizing: border-box;
}

.ag-giggle-this__caption:last-child {
	border-bottom: none;
}

.ag-giggle-this__empty {
	min-height: var(--ag-caption-row-height);
	margin: 0;
	padding: 0.65rem 0.5rem;
	font-size: 0.9rem;
	line-height: 1.4;
	color: #64748b;
	font-style: italic;
	text-align: center;
}

.ag-giggle-this__form {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.ag-giggle-this__form .label-with-count {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.5rem;
}

.ag-giggle-this__form label {
	font-size: 0.9rem;
	font-weight: 500;
	color: #334155;
}

.ag-giggle-this__form textarea {
	width: 100%;
	resize: vertical;
	min-height: 3.5rem;
	padding: 0.5rem 0.65rem;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 0.95rem;
	font-family: inherit;
	box-sizing: border-box;
}

.ag-giggle-this__form textarea:focus {
	outline: 2px solid #93c5fd;
	outline-offset: 1px;
	border-color: #60a5fa;
}

.ag-giggle-this__submit {
	align-self: flex-end;
	padding: 0.5rem 1.25rem;
	border: none;
	border-radius: 8px;
	background: #2563eb;
	color: #ffffff;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
}

.ag-giggle-this__submit:hover:not(:disabled) {
	background: #1d4ed8;
}

.ag-giggle-this__submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.ag-giggle-this__status {
	min-height: 1.25rem;
	font-size: 0.85rem;
	color: #475569;
}

.ag-giggle-this__status.is-error {
	color: #475569;
}

.ag-giggle-this__status.is-success {
	color: #15803d;
}

@media (max-width: 767px) {
	.ag-giggle-this {
		margin-top: 1rem;
		padding: 0.85rem;
		--ag-caption-row-height: 3.25rem;
	}

	.ag-giggle-this__heading {
		font-size: 1.1rem;
	}

	.ag-giggle-this__submit {
		width: 100%;
		align-self: stretch;
		min-height: 2.75rem;
	}

	.ag-giggle-this__info::after {
		left: auto;
		right: 0;
		transform: none;
	}
}
