/*
 * BBY dedication gift form (Figma "Donation popup", 88:3236).
 * Scoped under #bby-gift so it wins over Fluent Forms' own stylesheets, which load after this file.
 */
#bby-gift {
	--bby-ink: #3a1f4d;
	--bby-plum: #5f2b5f;
	--bby-line: #b59cb5;
	--bby-muted: #77707a;
	--bby-field: rgba(255, 255, 255, 0.28);
	--bby-icon: #b59cb5;
	max-width: 620px;
	margin: 0 auto;
	padding: 40px 44px 44px;
	border-radius: 16px;
	background: #e4dde3;
	color: #2b2b2b;
	font-family: var(--bs-font, 'paralucent'), sans-serif;
	box-shadow: 0 10px 30px rgba(58, 31, 77, 0.12);
}

/* ---------------------------------------------------------------- header */
#bby-gift .bby-gf-head { margin-bottom: 26px; text-align: center; }
#bby-gift .bby-gf-head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
#bby-gift .bby-gf-title { margin: 0; color: var(--bby-ink); font-size: 28px; font-weight: 500; line-height: 1.2; text-align: left; }
#bby-gift .bby-gf-more { color: var(--bby-plum); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
#bby-gift .bby-gf-more:hover { color: var(--bby-ink); }
#bby-gift .bby-gf-for { margin: 0; color: #4a4450; font-size: 19px; font-weight: 600; }
#bby-gift .bby-gf-amount { margin: 4px 0 0; color: #4a4450; font-size: 24px; font-weight: 600; }
#bby-gift .bby-gf-sandbox { display: inline-block; margin: 14px 0 0; padding: 4px 12px; border-radius: 20px; background: #f6e7b4; color: #5b4300; font-size: 13px; font-weight: 600; }
#bby-gift .bby-gf-pledged-note { margin: 0 0 18px; padding: 10px 14px; border-radius: 8px; background: rgba(255, 255, 255, 0.7); font-size: 15px; }
#bby-gift .bby-gf-pledged-note a { color: var(--bby-plum); font-weight: 600; }

/* ---------------------------------------------------------------- layout */
#bby-gift .frm-fluent-form { text-align: left; }
#bby-gift .frm-fluent-form fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; margin: 0; padding: 0; border: 0; min-width: 0; }
#bby-gift .frm-fluent-form fieldset > * { grid-column: 1 / -1; }
#bby-gift .frm-fluent-form .bby-gf-country,
#bby-gift .frm-fluent-form .bby-gf-city { grid-column: 1 / 2; }
#bby-gift .frm-fluent-form .bby-gf-postal-code { grid-column: 2 / 3; }
#bby-gift .frm-fluent-form legend,
#bby-gift .frm-fluent-form .ff_screen_reader_title { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#bby-gift .frm-fluent-form .ff-el-group { margin: 0 0 18px; }

/* ---------------------------------------------------------------- labels */
#bby-gift .frm-fluent-form .ff-el-input--label { margin-bottom: 6px; }
#bby-gift .frm-fluent-form .ff-el-input--label label { margin: 0; color: #221c26; font-size: 15px; font-weight: 600; line-height: 1.3; }
#bby-gift .frm-fluent-form .ff-el-input--label.asterisk-right label::after { color: #c0392b; margin-left: 3px; }
#bby-gift .bby-gf-section { margin: 10px 0 2px; color: var(--bby-muted); font-size: 22px; font-weight: 600; }

/* ---------------------------------------------------------------- text fields */
#bby-gift .frm-fluent-form input.ff-el-form-control,
#bby-gift .frm-fluent-form select.ff-el-form-control,
#bby-gift .frm-fluent-form textarea.ff-el-form-control {
	display: block;
	width: 100%;
	height: 50px;
	min-height: 50px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--bby-line);
	border-radius: 8px;
	background-color: var(--bby-field);
	color: #241e28;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.4;
	box-shadow: none;
	transition: border-color 0.3s ease-in-out, background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
#bby-gift .frm-fluent-form textarea.ff-el-form-control { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
#bby-gift .frm-fluent-form .ff-el-form-control::placeholder { color: #a99fac; opacity: 1; }
#bby-gift .frm-fluent-form .ff-el-form-control:hover { border-color: #9c829d; }
#bby-gift .frm-fluent-form .ff-el-form-control:focus {
	border-color: var(--bby-plum);
	background-color: rgba(255, 255, 255, 0.75);
	outline: none;
	box-shadow: none;
}

/* Field icons (Figma: person / envelope / phone) */
#bby-gift .bby-gf-first-name input.ff-el-form-control,
#bby-gift .bby-gf-last-name input.ff-el-form-control,
#bby-gift .bby-gf-email input.ff-el-form-control,
#bby-gift .bby-gf-phone input.ff-el-form-control {
	padding-left: 46px;
	background-repeat: no-repeat;
	background-position: 15px center;
	background-size: 20px 20px;
}
#bby-gift .bby-gf-first-name input.ff-el-form-control,
#bby-gift .bby-gf-last-name input.ff-el-form-control {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23b59cb5'%3E%3Ccircle cx='12' cy='7.5' r='4.5'/%3E%3Cpath d='M3 21c0-4.4 4-7.5 9-7.5s9 3.1 9 7.5z'/%3E%3C/svg%3E");
}
#bby-gift .bby-gf-email input.ff-el-form-control {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23b59cb5'%3E%3Cpath d='M2 6.5A1.5 1.5 0 0 1 3.5 5h17A1.5 1.5 0 0 1 22 6.5v.4l-10 6.3L2 6.9z'/%3E%3Cpath d='M2 9.2l10 6.3 10-6.3v8.3a1.5 1.5 0 0 1-1.5 1.5h-17A1.5 1.5 0 0 1 2 17.5z'/%3E%3C/svg%3E");
}
#bby-gift .bby-gf-phone input.ff-el-form-control {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23b59cb5'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- dropdowns */
#bby-gift .frm-fluent-form select.ff-el-form-control {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	padding: 0 44px 0 14px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M0 0h12L6 8z' fill='%2377707a'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 12px 8px;
	color: #4a4450;
	font-weight: 600;
	line-height: 48px;
	cursor: pointer;
}
#bby-gift .frm-fluent-form select.ff-el-form-control::-ms-expand { display: none; }
#bby-gift .frm-fluent-form select.ff-el-form-control:focus { background-color: rgba(255, 255, 255, 0.75); }

/* ---------------------------------------------------------------- checkbox (anonymous) */
#bby-gift .bby-gf-anon { margin-top: -4px; }
#bby-gift .bby-gf-anon .ff-el-form-check { margin: 0; }
#bby-gift .bby-gf-anon .ff-el-form-check-label { display: inline-flex; align-items: center; gap: 10px; margin: 0; color: #4b4350; font-size: 15px; font-weight: 600; cursor: pointer; }
#bby-gift .bby-gf-anon input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin: 0;
	border: 1.5px solid #9a8f9f;
	border-radius: 6px;
	background: var(--bby-field) center / 14px 14px no-repeat;
	cursor: pointer;
	transition: background-color 0.3s ease-in-out, border-color 0.3s ease-in-out;
}
#bby-gift .bby-gf-anon input[type="checkbox"]:checked {
	border-color: var(--bby-ink);
	background-color: var(--bby-ink);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5'/%3E%3C/svg%3E");
}
#bby-gift .bby-gf-anon input[type="checkbox"]:focus-visible { outline: none; border-color: var(--bby-plum); }

/* ---------------------------------------------------------------- Donate / Pledge toggle */
#bby-gift .bby-gf-paytoggle .ff-el-input--content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
#bby-gift .bby-gf-paytoggle .ff-el-form-check { margin: 0 !important; padding: 0; }
#bby-gift .bby-gf-paytoggle .ff-el-form-check-label {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 48px;
	margin: 0;
	border: 2px solid var(--bby-ink);
	border-radius: 6px;
	background: #fff;
	color: var(--bby-ink);
	font-size: 17px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.3s ease-in-out, border-color 0.3s ease-in-out, color 0.3s ease-in-out;
}
#bby-gift .bby-gf-paytoggle .ff-el-form-check-label:hover { background: #f3eef4; }
#bby-gift .bby-gf-paytoggle .ff-el-form-check-input { position: absolute; opacity: 0; pointer-events: none; }
#bby-gift .bby-gf-paytoggle .ff-el-form-check-label:has(input:checked) { background: var(--bby-ink); color: #fff; }


/* ---------------------------------------------------------------- card field (Banquest iframe) */
#bby-gift .bby-gf-card { padding: 0; border: 0; background: transparent; }
#bby-gift .bby-gf-card-label { margin: 0 0 6px; color: #221c26; font-size: 15px; font-weight: 600; }
#bby-gift #bby-card-frame { height: 104px; }
#bby-gift #bby-card-frame iframe { display: block; width: 100% !important; height: 100% !important; border: 0; }
#bby-gift .bby-gf-card-error { min-height: 1em; margin: 2px 0 0; color: #b32d2e; font-size: 14px; font-weight: 600; }
#bby-gift .bby-gf-card-error:empty { display: none; }
#bby-gift .bby-gf-card-note { margin: 4px 0 0; color: var(--bby-muted); font-size: 12px; }

/* ---------------------------------------------------------------- total + submit */
#bby-gift .bby-gf-total { margin: 6px 0 16px; color: #4a4450; font-size: 20px; text-align: center; }
#bby-gift .bby-gf-total strong { margin-left: 6px; font-weight: 600; }
#bby-gift .frm-fluent-form .ff_submit_btn_wrapper { margin: 0; }
#bby-gift .frm-fluent-form .ff-btn-submit {
	display: block;
	width: 100%;
	height: 58px;
	padding: 0 20px;
	border: 2px solid var(--bby-ink);
	border-radius: 8px;
	background: var(--bby-ink) !important;
	color: #fff !important;
	font-family: inherit;
	font-size: 22px;
	font-weight: 600;
	letter-spacing: 0.01em;
	cursor: pointer;
	box-shadow: 0 6px 16px rgba(58, 31, 77, 0.22);
	transition: background-color 0.3s ease-in-out, border-color 0.3s ease-in-out, color 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
#bby-gift .frm-fluent-form .ff-btn-submit:hover { background: var(--bby-plum) !important; border-color: var(--bby-plum); }
#bby-gift .frm-fluent-form .ff-btn-submit.is-busy,
#bby-gift .frm-fluent-form .ff-btn-submit:disabled { opacity: 0.6; cursor: wait; }

/* ---------------------------------------------------------------- errors / states */
#bby-gift .frm-fluent-form .error.text-danger,
#bby-gift .frm-fluent-form .ff-el-is-error .text-danger { margin-top: 5px; color: #b32d2e; font-size: 13px; font-weight: 600; }
#bby-gift .frm-fluent-form .ff-el-is-error .ff-el-form-control { border-color: #c0392b; }
#bby-gift .bby-gf-closed,
#bby-gift .bby-gf-thanks { padding: 24px; border-radius: 10px; background: #fff; text-align: center; }
#bby-gift .bby-gf-closed h3,
#bby-gift .bby-gf-thanks h3 { margin: 0 0 8px; color: var(--bby-ink); font-size: 24px; font-weight: 600; }
#bby-gift .bby-gf-ref { margin-top: 10px; color: var(--bby-muted); font-size: 13px; }
#bby-gift .ff-message-success { margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
#bby-gift:has(.bby-gf-thanks) .bby-gf-pledged-note { display: none; }

/* Accent font (Paralucent) for the title and buttons; everything else is Runda via --bs-font. */
#bby-gift .bby-gf-title,
#bby-gift .frm-fluent-form .ff-btn-submit,
#bby-gift .bby-gf-paytoggle .ff-el-form-check-label { font-family: var(--bs-font-accent, 'paralucent'), sans-serif; }

/* Keep the hidden Donate/Pledge radios inside their buttons, so focusing one doesn't scroll the popup to the top. */
#bby-gift .bby-gf-paytoggle .ff-el-form-check-label { position: relative; }
#bby-gift .bby-gf-paytoggle .ff-el-form-check-input { top: 50%; left: 50%; width: 1px; height: 1px; margin: 0; }

/* Split payments: checkbox (same look as "anonymous") + months dropdown + amount breakdown. */
#bby-gift .bby-gf-split { margin: 0 0 14px; }
#bby-gift .bby-gf-split .ff-el-form-check { margin: 0; }
#bby-gift .bby-gf-split .ff-el-form-check-label { display: inline-flex; align-items: center; gap: 10px; margin: 0; color: #2b2b2b; font-size: 17px; font-weight: 400; cursor: pointer; }
#bby-gift .bby-gf-split input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin: 0;
	border: 1.5px solid #9a8f9f;
	border-radius: 6px;
	background: var(--bby-field) center / 14px 14px no-repeat;
	cursor: pointer;
	transition: background-color 0.3s ease-in-out, border-color 0.3s ease-in-out;
}
#bby-gift .bby-gf-split input[type="checkbox"]:checked {
	border-color: var(--bby-ink);
	background-color: var(--bby-ink);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5'/%3E%3C/svg%3E");
}
#bby-gift .bby-gf-split-months { margin-bottom: 22px; }
#bby-gift .bby-gf-total-split { display: block; font-size: 18px; }
#bby-gift .bby-gf-total-sum { display: block; margin-top: 4px; color: var(--bby-muted); font-size: 15px; }
#bby-gift .bby-gf-total strong { margin-left: 0; }
