/* =================================================================
   Smart Random Step URL Shortener Pro — Frontend Styles v3.5
   Template-override layout (template_redirect + get_header/footer)
   Ads are in the normal page flow — no fixed bars needed.
================================================================= */

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

/* ── Shortener form [smart_shortener_form] ── */
.srus-form-wrap {
	max-width: 680px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.srus-input-row { display: flex; gap: 8px; flex-wrap: wrap; }
.srus-url-input {
	flex: 1 1 280px;
	padding: 13px 18px;
	font-size: 16px;
	border: 2px solid #d1d5db;
	border-radius: 10px;
	outline: none;
	transition: border-color .2s;
	background: #fff;
}
.srus-url-input:focus { border-color: #6366f1; }
.srus-submit-btn {
	padding: 13px 26px;
	font-size: 16px;
	font-weight: 600;
	background: #6366f1;
	color: #fff;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	transition: background .2s;
}
.srus-submit-btn:hover    { background: #4f46e5; }
.srus-submit-btn:disabled { background: #a5b4fc; cursor: not-allowed; }
.srus-error {
	margin-top: 10px; padding: 10px 16px;
	background: #fee2e2; color: #991b1b;
	border-radius: 8px; font-size: 14px;
}
.srus-result { margin-top: 20px; animation: srusFadeIn .3s ease; }
.srus-result-inner {
	background: #f0fdf4; border: 2px solid #86efac;
	border-radius: 10px; padding: 16px 20px;
}
.srus-result-label {
	display: block; font-size: 12px; font-weight: 700;
	color: #166534; margin-bottom: 8px;
	text-transform: uppercase; letter-spacing: .05em;
}
.srus-result-url-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.srus-result-link {
	font-size: 16px; font-weight: 600; color: #1d4ed8;
	word-break: break-all; text-decoration: none;
}
.srus-result-link:hover { text-decoration: underline; }
.srus-copy-btn {
	padding: 6px 14px; background: #6366f1; color: #fff;
	border: none; border-radius: 6px; font-size: 13px;
	font-weight: 600; cursor: pointer;
}
.srus-copy-btn:hover { background: #4f46e5; }

@keyframes srusFadeIn {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* =================================================================
   STEP PAGE WRAPPER
   The step page replaces the theme template entirely via
   template_redirect. get_header() and get_footer() are called
   so the theme's nav and footer still render.
================================================================= */
.srus-step-page {
	--srus-accent:  #6366f1;
	--srus-accent2: #8b5cf6;

	max-width: 800px;
	margin: 30px auto 60px;
	padding: 0 16px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* =================================================================
   TOP SECTION: step counter, ads, timer
================================================================= */
.srus-top-section {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	margin-bottom: 32px;
}

/* Step counter + progress bar */
.srus-step-header {
	width: 100%;
	text-align: center;
}
.srus-step-counter {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 700;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: .07em;
}
.srus-progress-wrap {
	height: 6px;
	background: #e2e8f0;
	border-radius: 99px;
	overflow: hidden;
	max-width: 480px;
	margin: 0 auto;
}
.srus-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, var(--srus-accent), var(--srus-accent2));
	border-radius: 99px;
	transition: width .5s ease;
}

/* =================================================================
   AD BLOCKS — DO NOT force width/height on child iframes/ins.
   Ad networks set their own dimensions via JS; overriding them
   breaks the ad network's dimension detection.
================================================================= */
.srus-ad-block {
	width: 100%;
	display: flex;
	justify-content: center;
	overflow: visible; /* let the ad define its own size */
	text-align: center;
}
.srus-ad-block > * { max-width: 100%; }
/* Allow images to be responsive, but do NOT touch iframes/ins */
.srus-ad-block img { max-width: 100%; height: auto; }

/* Ad network slots — subtle label for debugging (hidden in production via opacity 0 on label) */
.srus-ad-network { margin: 4px 0; }

/* =================================================================
   TIMER RING (large — centre of page, not crammed into a bar)
================================================================= */
.srus-timer-section {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}
.srus-timer-ring {
	position: relative;
	width: 120px;
	height: 120px;
}
.srus-ring-svg {
	width: 120px;
	height: 120px;
	transform: rotate(-90deg);
}
.srus-ring-bg {
	fill: none;
	stroke: #e2e8f0;
	stroke-width: 8;
}
.srus-ring-fg {
	fill: none;
	stroke: var(--srus-accent);
	stroke-width: 8;
	stroke-linecap: round;
	transition: stroke-dashoffset 1s linear;
}
.srus-timer-count {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 30px;
	font-weight: 800;
	color: #1e293b;
	letter-spacing: -.02em;
}
.srus-step-text {
	margin: 0;
	font-size: 14px;
	color: #64748b;
	text-align: center;
}

/* "Scroll down" hint — displayed after timer */
.srus-timer-msg {
	display: none;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 700;
	color: var(--srus-accent);
	text-align: center;
	animation: srusBounce .9s ease infinite;
	padding: 10px 18px;
	background: #f0f0ff;
	border-radius: 10px;
	border: 1px solid #c7d2fe;
	width: 100%;
	max-width: 420px;
	justify-content: center;
}
.srus-arrow { font-size: 18px; }
@keyframes srusBounce {
	0%,100% { transform: translateY(0); }
	50%      { transform: translateY(5px); }
}

/* =================================================================
   POST CONTENT
================================================================= */
.srus-post-content {
	margin: 32px 0;
	padding: 28px;
	background: #fff;
	border-radius: 14px;
	border: 1px solid #e2e8f0;
	box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.srus-post-title {
	font-size: 26px;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 20px;
	line-height: 1.3;
}
.srus-post-body {
	font-size: 16px;
	line-height: 1.75;
	color: #334155;
}
.srus-post-body p  { margin-bottom: 16px; }
.srus-post-body img { max-width: 100%; height: auto; border-radius: 8px; }

/* =================================================================
   BOTTOM SECTION: continue button + bottom ads
================================================================= */
.srus-bottom-section {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	margin-top: 32px;
}

/* "Thanks for your patience" message — shown after timer ends */
.srus-thanks-msg {
	display: none;
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #6366f1;
	text-align: center;
	padding: 14px 24px;
	background: #f0f0ff;
	border-radius: 12px;
	border: 1px solid #c7d2fe;
	width: 100%;
	max-width: 440px;
	animation: srusFadeIn .4s ease;
}

/* Button wrapper */
.srus-btn-wrap {
	display: flex;
	justify-content: center;
	width: 100%;
}

/* =================================================================
   CONTINUE BUTTON
   Starts visible but disabled (greyed).
   After timer: enabled with purple style, single click navigates.
================================================================= */
.continue-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 16px 48px;
	font-size: 18px;
	font-weight: 700;
	border: none;
	border-radius: 14px;
	cursor: not-allowed;
	letter-spacing: .01em;
	width: 100%;
	max-width: 440px;
	font-family: inherit;
	transition: background .25s, box-shadow .25s, transform .2s, opacity .25s;
	/* Disabled state */
	background: #e2e8f0;
	color: #94a3b8;
	box-shadow: none;
	opacity: 1;
}

/* Enabled state — added by JS after timer ends */
.continue-btn.srus-btn-ready {
	background: #6366f1;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(99,102,241,.35);
	animation: srusFadeIn .35s ease;
}
.continue-btn.srus-btn-ready:hover  { background: #4f46e5; box-shadow: 0 8px 24px rgba(99,102,241,.45); }
.continue-btn.srus-btn-ready:active { transform: scale(.97); }

/* =================================================================
   SIDEBAR ADS — fixed left / right (desktop only)
================================================================= */
.srus-sidebar-ad {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	width: 160px;
	z-index: 9000;
	overflow: visible;
}
.srus-sidebar-left  { left: 4px; }
.srus-sidebar-right { right: 4px; }

/* =================================================================
   RESPONSIVE
================================================================= */
@media (max-width: 1100px) { .srus-sidebar-ad { display: none; } }

@media (max-width: 600px) {
	.srus-step-page      { margin-top: 16px; }
	.srus-timer-ring     { width: 96px; height: 96px; }
	.srus-ring-svg       { width: 96px; height: 96px; }
	.srus-timer-count    { font-size: 24px; }
	.srus-post-content   { padding: 18px 14px; }
	.srus-post-title     { font-size: 20px; }
	.continue-btn        { font-size: 16px; padding: 14px 24px; }
	.srus-thanks-msg     { font-size: 16px; padding: 12px 18px; }
}
