/*
 * Short order form under the results of the free follower-count tools.
 * Form styles are the blog's quick order form (resources theme,
 * quick-order.css); the tool-specific placement and the compact mobile layout
 * follow at the end. Markup: app/views/components/tool_quick_order.php.
 */


.gr-qo {
	--gr-qo-accent: #ff5a2c;
	--gr-qo-ink: #1a1a1a;
	--gr-qo-muted: #8a8580;
	--gr-qo-line: #e7e3df;
	--gr-qo-field: #faf9f7;

	position: relative;
	font-family: "Inter", sans-serif;
	color: var(--gr-qo-ink);
	padding: 22px 22px 18px;
	/* White card with a 3px orange gradient border. */
	background:
		linear-gradient(#fff, #fff) padding-box,
		linear-gradient(135deg, #ff8a4c 0%, #ff4b24 100%) border-box;
	border: 3px solid transparent;
	border-radius: 22px;
	box-shadow: 0 14px 34px rgba(255, 90, 44, 0.16);
}

.gr-qo *,
.gr-qo *::before,
.gr-qo *::after {
	box-sizing: border-box;
}

.gr-qo__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 16px;
}

.gr-qo__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.gr-qo__badge {
	flex-shrink: 0;
	padding: 3px 8px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--gr-qo-accent);
	background: #ffede5;
	border-radius: 6px;
}

.gr-qo__field {
	margin: 0 0 16px;
	padding: 0;
	border: 0;
	min-width: 0;
}

.gr-qo__field[hidden] {
	display: none;
}

.gr-qo__label {
	display: block;
	margin: 0 0 8px;
	padding: 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--gr-qo-muted);
}

/* Visually hidden radios, still keyboard reachable. */
.gr-qo input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

.gr-qo__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}


.gr-qo__pill {
	position: relative;
	margin: 0;
	cursor: pointer;
}

.gr-qo__pill span {
	display: block;
	padding: 8px 12px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	text-align: center;
	white-space: nowrap;
	color: var(--gr-qo-ink);
	background: #fff;
	border: 1px solid var(--gr-qo-line);
	border-radius: 10px;
	transition: border-color .2s, background-color .2s, color .2s;
}


.gr-qo__pill:hover span {
	border-color: #bdb6b0;
}

.gr-qo__pill input:checked + span {
	font-weight: 600;
	color: #fff;
	background: var(--gr-qo-ink);
	border-color: var(--gr-qo-ink);
}

.gr-qo__pill input:focus-visible + span {
	outline: 2px solid var(--gr-qo-accent);
	outline-offset: 2px;
}

/* Package: styled display over a hidden native select. */
.gr-qo__package,
.gr-qo__control {
	position: relative;
	display: flex;
	align-items: center;
	background: var(--gr-qo-field);
	border: 1px solid var(--gr-qo-line);
	border-radius: 12px;
	transition: border-color .2s, box-shadow .2s;
}

.gr-qo__package {
	min-height: 50px;
	padding: 0 34px 0 14px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%238a8580'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	cursor: pointer;
}

.gr-qo__package:focus-within,
.gr-qo__control:focus-within {
	border-color: var(--gr-qo-accent);
	box-shadow: 0 0 0 3px rgba(255, 90, 44, 0.14);
}

.gr-qo__package-display {
	display: flex;
	align-items: baseline;
	gap: 8px;
	width: 100%;
	min-width: 0;
}

.gr-qo__package-display strong {
	font-size: 17px;
	font-weight: 700;
}

.gr-qo__package-unit {
	font-size: 13px;
	color: #6b6560;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gr-qo__package-price {
	margin-left: auto;
	font-size: 15px;
	font-weight: 700;
	color: var(--gr-qo-accent);
}

.gr-qo .gr-qo__package-select {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0 14px;
	font-size: 16px;
	opacity: 0;
	pointer-events: none;
}

/* Styled package list (see quick-order.js), opening over the fields below. */
.gr-qo__field--package {
	position: relative;
	z-index: 5;
}

.gr-qo__package.is-open {
	border-color: var(--gr-qo-accent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 6h10L5 0z' fill='%238a8580'/%3E%3C/svg%3E");
}

.gr-qo__package-list {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 20;
	max-height: 250px;
	margin: 6px 0 0;
	padding: 6px;
	overflow-y: auto;
	overscroll-behavior: contain;
	list-style: none;
	background: #fff;
	border: 1px solid var(--gr-qo-line);
	border-radius: 12px;
	box-shadow: 0 14px 34px rgba(25, 27, 54, 0.16);
}

/* Not enough room below: open upwards. */
.gr-qo__package-list.is-up {
	top: auto;
	bottom: 100%;
	margin: 0 0 6px;
}

.gr-qo__package-list[hidden] {
	display: none;
}

.gr-qo__package-list li {
	margin: 0;
	padding: 10px 12px;
	font-size: 15px;
	text-align: center;
	border-radius: 9px;
	cursor: pointer;
}

.gr-qo__package-list li:hover,
.gr-qo__package-list li:focus-visible {
	background: var(--gr-qo-field);
	outline: none;
}

.gr-qo__package-list li[aria-selected="true"] {
	font-weight: 700;
	color: var(--gr-qo-accent);
	background: rgba(255, 90, 44, 0.1);
}

.gr-qo .gr-qo__select {
	display: block;
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0 14px;
	font: inherit;
	font-size: 15px;
	color: var(--gr-qo-ink);
	background: transparent;
	border: 0;
	border-radius: 12px;
	box-shadow: none;
	outline: none;
	padding-right: 34px;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%238a8580'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	cursor: pointer;
}

.gr-qo__submit {
	display: block;
	width: 100%;
	min-height: 52px;
	padding: 12px 16px;
	font-family: "Inter", sans-serif;
	font-size: 17px;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(100deg, #ff9f6e 0%, #ff5a2c 100%);
	border: 0;
	border-radius: 14px;
	box-shadow: 0 8px 20px rgba(255, 90, 44, 0.25);
	cursor: pointer;
	transition: filter .2s, transform .2s;
}

.gr-qo__submit:hover {
	filter: brightness(1.04);
	transform: translateY(-1px);
}

.gr-qo__submit:focus-visible {
	outline: 2px solid var(--gr-qo-ink);
	outline-offset: 2px;
}

.gr-qo__next {
	margin: 10px 0 0;
	font-size: 12px;
	text-align: center;
	color: var(--gr-qo-muted);
}

.gr-qo__next strong {
	font-weight: 600;
	color: var(--gr-qo-ink);
}

@media (prefers-reduced-motion: reduce) {
	.gr-qo__submit:hover { transform: none; }
}

/* Tool placement: below the counts, replacing the old CTA buttons. */

.tool-qo-holder[hidden] {
	display: none;
}

.tool-qo-slot {
	width: 100%;
}

.tool-qo-wrap {
	width: 100%;
	text-align: left;
}

/* The results card is centred text; the form is not. */
.tool-qo-wrap .gr-qo {
	width: 100%;
	text-align: left;
}

/*
 * free_tools.css styles every paragraph in the tool hero (white, 18px,
 * centred), so the form's paragraphs restate their own type here.
 */
.tool-qo-wrap .gr-qo p.gr-qo__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	text-align: left;
	color: var(--gr-qo-ink) !important;
}

.tool-qo-wrap .gr-qo p.gr-qo__next {
	margin: 10px 0 0;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.5;
	text-align: center;
	color: var(--gr-qo-muted) !important;
}

/* Product pills need no heading: the card title says what they are. */
.gr-qo__label--hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Phones: the results card leaves ~300px, so keep the form compact. */
@media (max-width: 530px) {
	.tool-qo-wrap .gr-qo {
		padding: 16px 14px 14px;
		border-radius: 18px;
		box-shadow: 0 10px 24px rgba(255, 90, 44, 0.14);
	}

	.tool-qo-wrap .gr-qo__head {
		margin-bottom: 12px;
	}

	.tool-qo-wrap .gr-qo p.gr-qo__title {
		font-size: 16px;
	}

	.tool-qo-wrap .gr-qo__field {
		margin-bottom: 12px;
	}

	.tool-qo-wrap .gr-qo__pills {
		gap: 5px;
	}

	.tool-qo-wrap .gr-qo__pill span {
		padding: 7px 10px;
		font-size: 12.5px;
	}

	.tool-qo-wrap .gr-qo__package {
		min-height: 46px;
		padding-left: 12px;
	}

	.tool-qo-wrap .gr-qo__package-display strong {
		font-size: 16px;
	}

	.tool-qo-wrap .gr-qo__package-price {
		font-size: 14px;
	}

	.tool-qo-wrap .gr-qo__submit {
		min-height: 48px;
		font-size: 16px;
	}
}
