.icfp-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	/* Themes (block themes in particular) constrain content children with a
	   max-width and auto margins; without this the overlay is squashed into a
	   narrow centered band instead of covering the viewport. */
	max-width: none;
	width: auto;
	margin: 0;
}

.icfp-modal.is-open {
	display: block;
}

.icfp-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.icfp-modal__content {
	position: relative;
	max-width: 520px;
	margin: 8vh auto 0;
	padding: 20px;
	background: #fff;
	border-radius: 8px;
	z-index: 2;
	height: 400px;
    overflow-y: auto;
    padding-bottom: 80px;
}

.icfp-modal__close {
	position: absolute;
	right: 10px;
	top: 8px;
	border: 0;
	background: transparent;
	font-size: 24px;
	cursor: pointer;
}

.icfp-phone-input {
	width: 100%;
	margin: 8px 0 12px;
	padding: 10px;
}

.icfp-subscribe-confirm {
	padding: 10px 14px;
	cursor: pointer;
}

.icfp-feedback {
	margin-top: 10px;
	color: #2271b1;
}

.icfp-feedback.error {
	color: #d63638;
}

/* Feedback region rendered by [icodeplugins_firebase_subscribe_feedback] (style freely). */
.icfp-subscribe-feedback {
	margin-top: 10px;
	color: #2271b1;
}

.icfp-subscribe-feedback.error {
	color: #d63638;
}

.icfp-subscribe-feedback:empty {
	display: none;
}

/* Native WP snackbar toast layer (display="toast"). The frontend has no toast
   wrapper like the editor, so we fix-position it ourselves. */
.icfp-toasts {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 100000;
}

/* Etats du bouton toggle (a personnaliser selon votre design). */
.icfp-subscribe-open.subscribed {
	border-color: #2271b1;
}

.icfp-subscribe-open.unsubscribed {
	border-color: #ccc;
}

.icfp-subscribe-open[aria-busy="true"] {
	opacity: 0.6;
	cursor: wait;
}

/* --- Bell button style (opt-in via the shortcode `class` attribute) ----------
   Add one of these classes to the subscribe button:
     [icodeplugins_firebase_subscribe_btn class="icfp-bell"]        icon only
     [icodeplugins_firebase_subscribe_btn class="icfp-bell-text"]   icon + label
   Both share the same state colours — white background + dark bell when NOT
   subscribed, green background + white bell once subscribed. The bell is a CSS
   mask, so it always matches the current text colour. */

.icfp-bell,
.icfp-bell-text {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: 1px solid #d5d7da;
	border-radius: 999px;
	background-color: #fff;
	color: #1a1a1a;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

/* The bell glyph, recoloured to the current text colour via a mask. */
.icfp-bell::before,
.icfp-bell-text::before {
	content: "";
	flex: none;
	width: 1.25em;
	height: 1.25em;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 19v1H3v-1l2-2v-6c0-3.1 2.03-5.83 5-6.71V4a2 2 0 0 1 2-2a2 2 0 0 1 2 2v.29c2.97.88 5 3.61 5 6.71v6zm-7 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 19v1H3v-1l2-2v-6c0-3.1 2.03-5.83 5-6.71V4a2 2 0 0 1 2-2a2 2 0 0 1 2 2v.29c2.97.88 5 3.61 5 6.71v6zm-7 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Icon + label variant. */
.icfp-bell-text {
	padding: 8px 16px;
	font-weight: 600;
}

/* Icon-only variant: fixed round size; the label stays in the DOM for screen
   readers (font-size:0 collapses the text but not the fixed-size icon). */
.icfp-bell {
	width: 44px;
	height: 44px;
	padding: 0;
	font-size: 0;
}
.icfp-bell::before {
	width: 22px;
	height: 22px;
}

/* State colours (the script toggles .subscribed / .unsubscribed). */
.icfp-bell.unsubscribed,
.icfp-bell-text.unsubscribed {
	background-color: #fff;
	color: #1a1a1a;
	border-color: #d5d7da;
}
.icfp-bell.subscribed,
.icfp-bell-text.subscribed {
	background-color: #16a34a;
	color: #fff;
	border-color: #16a34a;
}

/* While a request is in flight, hide the bell so only the spinner shows. */
.icfp-bell.icfp-loading::before,
.icfp-bell-text.icfp-loading::before {
	display: none;
}
.icfp-bell.icfp-loading .icfp-spinner {
	margin-right: 0;
}

.icfp-toasts {
	z-index: 9999999;
	position: fixed;
	left: 50%;
	top: 50%;
	width: 340px;
	height: 2rem;
	margin-left: -170px;
	margin-top: -1rem;
	border-radius: 0.5rem
}

/* --- II.4 Placement & accent color (admin-configurable) --- */

/* Accent color applied to the default subscribe button when set via --icfp-accent. */
button.icfp-subscribe-open[style*="--icfp-accent"] {
	background-color: var(--icfp-accent) !important;
	border-color: var(--icfp-accent) !important;
	color: #fff !important;
}

/* Fixed on-screen placement of the subscribe button. */
.icfp-subscribe-open--fixed {
	position: fixed;
	z-index: 100000;
}
.icfp-subscribe-open--bottom-right {
	right: 20px;
	bottom: 20px;
}
.icfp-subscribe-open--bottom-left {
	left: 20px;
	bottom: 20px;
}
.icfp-subscribe-open--top-right {
	right: 20px;
	top: 20px;
}
.icfp-subscribe-open--top-left {
	left: 20px;
	top: 20px;
}

/* Feedback toast on-screen position (overrides the default centered mount). */

/* "Do not style": neutralize the plugin's positioning so the theme/CSS controls it. */
.icfp-toasts--none {
	position: static !important;
	left: auto !important;
	right: auto !important;
	top: auto !important;
	bottom: auto !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
}

/* Centered on screen. */
.icfp-toasts--center {
	left: 50% !important;
	right: auto !important;
	top: 50% !important;
	bottom: auto !important;
	margin-left: -170px !important;
	margin-top: -1rem !important;
}

.icfp-toasts--bottom-right {
	left: auto;
	right: 16px;
	top: auto;
	bottom: 16px;
	margin: 0;
}
.icfp-toasts--bottom-left {
	left: 16px;
	right: auto;
	top: auto;
	bottom: 16px;
	margin: 0;
}
.icfp-toasts--top-right {
	left: auto;
	right: 16px;
	top: 16px;
	bottom: auto;
	margin: 0;
}
.icfp-toasts--top-left {
	left: 16px;
	right: auto;
	top: 16px;
	bottom: auto;
	margin: 0;
}
/* Loading spinner shown on the subscribe / unsubscribe button while the request is in
   flight. Inherits the button's text colour via currentColor, so it fits any theme. */
.icfp-spinner {
	display: inline-block;
	vertical-align: middle;
	margin-right: 8px;
	animation: icfp-spin 0.7s linear infinite;
}
.icfp-spinner__track {
	stroke: currentColor;
	opacity: 0.25;
}
.icfp-spinner__head {
	stroke: currentColor;
	stroke-dasharray: 57;
	stroke-dashoffset: 42;
}
.icfp-loading {
	cursor: progress;
}
@keyframes icfp-spin {
	to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
	.icfp-spinner { animation-duration: 1.5s; }
}

/* The toast mount is a fixed, centred, always-present box on top of the page. Empty or
   not, it would swallow clicks landing under it — and it holds nothing clickable. */
.icfp-toasts{
    pointer-events: none;
}
