/*
 * Shining Star sponsor confirmation (task 40848081).
 *
 * Hand written and served as-is rather than compiled into dist/main.css, the
 * same way card-align.css and fonts.css are. Every value binds to a brand
 * token declared in assets/css/tailwind.css, so the dialog follows the palette
 * from one place instead of carrying its own hexes.
 *
 * The dialog stays closed until the script removes the hidden attribute, and
 * hidden wins over every rule here, so nothing flashes on a page whose
 * stylesheet arrives late.
 */

.cckc-ss-confirm[hidden] {
	display: none;
}

.cckc-ss-confirm {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.cckc-ss-confirm__backdrop {
	position: absolute;
	inset: 0;
	background: var(--color-primary-70, rgba(25, 42, 74, 0.7));
}

.cckc-ss-confirm__panel {
	position: relative;
	width: 100%;
	max-width: 460px;
	padding: 32px;
	border-radius: 16px;
	background: var(--color-cream, #f7f7f5);
	box-shadow: 0 24px 60px rgba(25, 42, 74, 0.28);
	text-align: center;
}

.cckc-ss-confirm__title {
	margin: 0;
	font-family: var(--font-heading, 'Cormorant Garamond', Georgia, serif);
	font-size: clamp(24px, 3vw, 30px);
	line-height: 1.15;
	color: var(--color-primary, #192a4a);
}

.cckc-ss-confirm__note {
	margin: 12px 0 0;
	font-size: 15px;
	line-height: 1.5;
	color: var(--color-dark, #4a4a42);
}

.cckc-ss-confirm__actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 24px;
}

@media (min-width: 480px) {
	.cckc-ss-confirm__actions {
		flex-direction: row;
		justify-content: center;
	}
}

/* Both controls clear the 44px touch target the brand spec asks for. */
.cckc-ss-confirm__yes,
.cckc-ss-confirm__no {
	min-height: 46px;
	padding: 12px 32px;
	border-radius: 9999px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.cckc-ss-confirm__yes {
	border: 2px solid var(--color-primary, #192a4a);
	background: var(--color-primary, #192a4a);
	color: #fff;
}

.cckc-ss-confirm__yes:hover {
	background: var(--color-primary-dark, #101a30);
	border-color: var(--color-primary-dark, #101a30);
}

.cckc-ss-confirm__no {
	border: 2px solid var(--color-primary, #192a4a);
	background: transparent;
	color: var(--color-primary, #192a4a);
}

.cckc-ss-confirm__no:hover {
	background: var(--color-primary, #192a4a);
	color: #fff;
}

.cckc-ss-confirm__yes[disabled],
.cckc-ss-confirm__no[disabled] {
	opacity: 0.6;
	cursor: default;
}

.cckc-ss-confirm__yes:focus-visible,
.cckc-ss-confirm__no:focus-visible {
	outline: 3px solid var(--color-secondary, #b85c38);
	outline-offset: 2px;
}

/* Empty until there is something to say, so it takes no room in the layout. */
.cckc-ss-confirm__message:empty {
	display: none;
}

.cckc-ss-confirm__message {
	margin: 16px 0 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--color-dark, #4a4a42);
}

.cckc-ss-confirm__message[data-state="error"] {
	color: var(--color-secondary-dark, #9a4a2c);
}

/*
 * The sponsorship form step.
 *
 * The panel holds two steps and only ever shows one, so it has to grow from
 * the question to a three field form without ever growing past the window.
 * The form is Gravity Forms' own markup, which arrives carrying the plugin's
 * default look, so the rules below pull its labels, inputs and submit button
 * onto the same tokens the rest of this dialog uses.
 */

.cckc-ss-confirm [data-ss-step][hidden] {
	display: none;
}

.cckc-ss-confirm__panel {
	max-height: calc(100vh - 40px);
	overflow-y: auto;
}

.cckc-ss-confirm__form {
	margin-top: 20px;
	text-align: left;
}

.cckc-ss-confirm__form .cckc-ss-confirm__note {
	text-align: center;
}

.cckc-ss-confirm__actions--form {
	margin-top: 16px;
}

.cckc-ss-confirm__form .gform_wrapper {
	margin: 16px 0 0;
}

.cckc-ss-confirm__form .gform_wrapper form {
	margin: 0;
}

.cckc-ss-confirm__form .gfield_label,
.cckc-ss-confirm__form .gform_wrapper legend {
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	color: var(--color-primary, #192a4a);
}

.cckc-ss-confirm__form input[type="text"],
.cckc-ss-confirm__form input[type="email"],
.cckc-ss-confirm__form input[type="tel"] {
	width: 100%;
	min-height: 46px;
	padding: 10px 14px;
	border: 1px solid var(--color-primary-30, rgba(25, 42, 74, 0.3));
	border-radius: 8px;
	background: #fff;
	font-family: inherit;
	font-size: 15px;
	color: var(--color-dark, #4a4a42);
}

.cckc-ss-confirm__form input:focus-visible {
	outline: 3px solid var(--color-secondary, #b85c38);
	outline-offset: 1px;
}

/* Match the Yes control this step replaced, so the dialog reads as one piece. */
.cckc-ss-confirm__form .gform_button {
	width: 100%;
	min-height: 46px;
	padding: 12px 32px;
	border: 2px solid var(--color-primary, #192a4a);
	border-radius: 9999px;
	background: var(--color-primary, #192a4a);
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.cckc-ss-confirm__form .gform_button:hover {
	background: var(--color-primary-dark, #101a30);
	border-color: var(--color-primary-dark, #101a30);
}

.cckc-ss-confirm__form .gform_button:focus-visible {
	outline: 3px solid var(--color-secondary, #b85c38);
	outline-offset: 2px;
}

.cckc-ss-confirm__form .gform_confirmation_message {
	font-size: 15px;
	line-height: 1.5;
	color: var(--color-dark, #4a4a42);
	text-align: center;
}

.cckc-ss-confirm__form .gfield_required,
.cckc-ss-confirm__form .gfield_validation_message,
.cckc-ss-confirm__form .validation_message {
	color: var(--color-secondary-dark, #9a4a2c);
}
