/**
 * Styles for Call Now and Request a Callback Features
 * Matches Wood Cabinet Factory brand design tokens and mockup.
 *
 * @package Room_And_Hearth
 */

:root {
	--rh-call-terracotta: #b8532f;
	--rh-call-terracotta-dark: #9f4423;
	--rh-call-forest-green: #1b332b;
	--rh-call-forest-green-dark: #132620;
	--rh-call-ink: #1f1b16;
	--rh-call-muted: #6f6a5e;
	--rh-call-border: #e2dcd3;
	--rh-call-bg-warm: #faf8f5;
	--rh-call-radius: 8px;
}

/* ==========================================================================
   1. Header Call Box Unit
   ========================================================================== */
.header-call-box {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
	margin-left: auto;
	padding: 0 4px;
}

.header-call-box__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--rh-call-terracotta);
	flex-shrink: 0;
}

.header-call-box__info {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
	text-align: left;
}

.header-call-box__phone {
	font-size: 15px;
	font-weight: 700;
	color: var(--rh-call-ink);
	text-decoration: none;
	white-space: nowrap;
	letter-spacing: -0.01em;
	transition: color 0.15s ease;
}

.header-call-box__phone:hover {
	color: var(--rh-call-terracotta);
	text-decoration: none;
}

.header-call-box__sub {
	font-size: 11.5px;
	color: var(--rh-call-muted);
	white-space: nowrap;
}

.header-call-box__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: var(--rh-call-terracotta);
	color: #ffffff !important;
	font-size: 13.5px;
	font-weight: 600;
	padding: 8px 18px;
	border-radius: 6px;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 1px 3px rgba(184, 83, 47, 0.25);
	transition: background-color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
	line-height: 1.3;
}

.header-call-box__btn:hover {
	background-color: var(--rh-call-terracotta-dark);
	color: #ffffff !important;
	text-decoration: none;
	transform: translateY(-1px);
	box-shadow: 0 3px 6px rgba(184, 83, 47, 0.32);
}

/* Responsive adjustments for header call box */
@media (max-width: 1100px) {
	.header-call-box {
		gap: 8px;
	}
	.header-call-box__phone {
		font-size: 14px;
	}
	.header-call-box__btn {
		padding: 7px 14px;
		font-size: 13px;
	}
}

@media (max-width: 900px) {
	.header-call-box__sub {
		display: none;
	}
}

@media (max-width: 800px) {
	.header-call-box {
		margin-left: 0;
	}
	.header-call-box__info {
		display: none;
	}
	.header-call-box__btn {
		padding: 6px 12px;
		font-size: 12.5px;
	}
}

@media (max-width: 480px) {
	.header-call-box__btn {
		display: none; /* Persistent mobile sticky bar handles this on small phones */
	}
	.header-call-box__icon {
		display: flex;
	}
}

/* ==========================================================================
   2. Homepage Hero Secondary CTA
   ========================================================================== */
.rh-btn-hero-callback {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 0 !important;
	background-color: #ffffff !important;
	color: var(--rh-call-terracotta) !important;
	border: 1.5px solid var(--rh-call-terracotta) !important;
	font-weight: 600 !important;
	font-size: 14px !important;
	height: 48px !important;
	min-height: 48px !important;
	padding: 0 22px !important;
	border-radius: 6px !important;
	cursor: pointer !important;
	text-decoration: none !important;
	line-height: 1 !important;
	box-sizing: border-box !important;
	white-space: nowrap;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease !important;
}

.rh-btn-hero-callback svg,
.rh-btn-hero-callback .rh-hero__btn-cal {
	flex-shrink: 0;
	margin-right: 8px;
	stroke: currentColor;
}

.rh-btn-hero-callback:hover,
.rh-btn-hero-callback:focus-visible {
	background-color: #fcf6f3 !important;
	border-color: var(--rh-call-terracotta-dark) !important;
	color: var(--rh-call-terracotta-dark) !important;
	transform: translateY(-1px) !important;
}

@media (max-width: 560px) {
	.rh-btn-hero-callback {
		width: 100% !important;
		padding: 0 18px !important;
		white-space: normal !important;
	}
}

@media (max-width: 390px) {
	.rh-btn-hero-callback {
		font-size: 13.5px !important;
		padding: 0 14px !important;
	}
}

/* ==========================================================================
   3. Accessible Callback Modal Dialog
   ========================================================================== */
body.rh-modal-open {
	overflow: hidden !important;
}

.rh-callback-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.22s ease, visibility 0.22s ease;
}

.rh-callback-overlay.is-active {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

.rh-callback-backdrop {
	position: absolute;
	inset: 0;
	background-color: rgba(18, 16, 14, 0.65);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.rh-callback-dialog {
	position: relative;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22), 0 8px 20px rgba(0, 0, 0, 0.12);
	width: 100%;
	max-width: 480px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	padding: 34px 36px 30px;
	z-index: 1;
	transform: scale(0.96) translateY(8px);
	transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.rh-callback-overlay.is-active .rh-callback-dialog {
	transform: scale(1) translateY(0);
}

.rh-callback-close {
	position: absolute;
	top: 20px;
	right: 20px;
	background: transparent;
	border: 0;
	cursor: pointer;
	padding: 6px;
	color: #8c867c;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.15s ease, background-color 0.15s ease;
}

.rh-callback-close:hover {
	color: var(--rh-call-ink);
	background-color: #f3efe8;
}

.rh-callback-header {
	margin-bottom: 22px;
	padding-right: 28px;
}

.rh-callback-title {
	font-family: var(--serif, 'Playfair Display', Georgia, serif);
	font-size: 27px;
	font-weight: 600;
	color: var(--rh-call-ink);
	margin: 0 0 6px;
	line-height: 1.2;
}

.rh-callback-subtitle {
	font-size: 14px;
	color: var(--rh-call-muted);
	margin: 0;
	line-height: 1.45;
}

.rh-callback-form {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.rh-callback-row--two-col {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

@media (max-width: 480px) {
	.rh-callback-row--two-col {
		grid-template-columns: 1fr;
		gap: 15px;
	}
	.rh-callback-dialog {
		padding: 26px 20px 22px;
		border-radius: 12px;
	}
}

.rh-callback-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	text-align: left;
}

.rh-callback-label {
	font-size: 13px;
	font-weight: 600;
	color: var(--rh-call-ink);
}

.rh-required {
	color: #c93b27;
	font-weight: 700;
}

.rh-callback-input,
.rh-callback-select {
	width: 100%;
	height: 44px;
	padding: 10px 14px;
	font-size: 14px;
	font-family: inherit;
	color: var(--rh-call-ink);
	background-color: var(--rh-call-bg-warm);
	border: 1px solid var(--rh-call-border);
	border-radius: var(--rh-call-radius);
	outline: none;
	box-sizing: border-box;
	transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.rh-callback-input:focus,
.rh-callback-select:focus {
	background-color: #ffffff;
	border-color: var(--rh-call-terracotta);
	box-shadow: 0 0 0 3px rgba(184, 83, 47, 0.15);
}

.rh-callback-select-wrap {
	position: relative;
	width: 100%;
}

.rh-callback-select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	padding-right: 36px;
	cursor: pointer;
}

.rh-callback-select-chevron {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	color: #7d776d;
}

.rh-callback-product-preview {
	background-color: #f7f3ed;
	border: 1px solid #e7e0d5;
	border-radius: 6px;
	padding: 9px 12px;
	font-size: 12.5px;
	color: var(--rh-call-muted);
}

.rh-callback-product-preview__name {
	display: block;
	color: var(--rh-call-ink);
	font-size: 13.5px;
	margin-top: 2px;
}

.rh-callback-status {
	padding: 11px 14px;
	border-radius: 6px;
	font-size: 13.5px;
	line-height: 1.4;
	text-align: center;
}

.rh-callback-status--success {
	background-color: #edf7ee;
	color: #1e6628;
	border: 1px solid #c2e5c6;
}

.rh-callback-status--error {
	background-color: #fdf0ee;
	color: #b22718;
	border: 1px solid #f6cfc9;
}

.rh-callback-submit-btn {
	width: 100%;
	height: 48px;
	background-color: var(--rh-call-terracotta);
	color: #ffffff;
	border: none;
	border-radius: var(--rh-call-radius);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	margin-top: 8px;
	box-shadow: 0 2px 6px rgba(184, 83, 47, 0.3);
	transition: background-color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}

.rh-callback-submit-btn:hover:not(:disabled) {
	background-color: var(--rh-call-terracotta-dark);
	box-shadow: 0 4px 10px rgba(184, 83, 47, 0.38);
	transform: translateY(-1px);
}

.rh-callback-submit-btn:disabled {
	opacity: 0.75;
	cursor: not-allowed;
}

.rh-callback-lock-notice {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 12px;
	color: #827b70;
	margin-top: 6px;
}

.rh-callback-lock-notice svg {
	stroke: #827b70;
	flex-shrink: 0;
}

/* ==========================================================================
   4. Mobile Sticky Bottom Action Bar
   ========================================================================== */
.rh-mobile-sticky-bar {
	display: none;
}

@media (max-width: 768px) {
	/* Avoid footer and button obstruction on mobile */
	body:not(.woocommerce-cart):not(.woocommerce-checkout) {
		padding-bottom: 64px !important;
	}

	.rh-mobile-sticky-bar {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 9999;
		display: flex;
		align-items: stretch;
		height: 56px;
		background: #ffffff;
		box-shadow: 0 -3px 18px rgba(0, 0, 0, 0.14);
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}

	.rh-mobile-sticky-bar__btn {
		flex: 1;
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		font-size: 14px;
		font-weight: 600;
		text-decoration: none;
		border: none;
		cursor: pointer;
		padding: 0 12px;
		transition: background-color 0.15s ease;
	}

	.rh-mobile-sticky-bar__btn--call {
		background-color: var(--rh-call-forest-green);
		color: #ffffff !important;
	}

	.rh-mobile-sticky-bar__btn--call:hover,
	.rh-mobile-sticky-bar__btn--call:active {
		background-color: var(--rh-call-forest-green-dark);
		color: #ffffff !important;
		text-decoration: none;
	}

	.rh-mobile-sticky-bar__btn--callback {
		background-color: var(--rh-call-terracotta);
		color: #ffffff !important;
	}

	.rh-mobile-sticky-bar__btn--callback:hover,
	.rh-mobile-sticky-bar__btn--callback:active {
		background-color: var(--rh-call-terracotta-dark);
		color: #ffffff !important;
	}

	.rh-mobile-sticky-bar__btn svg {
		flex-shrink: 0;
	}
}

/* ==========================================================================
   5. Product Page Call & Callback Section
   ========================================================================== */
.rh-product-call-cta {
	background: var(--rh-call-bg-warm);
	border: 1px solid var(--rh-call-border);
	border-radius: 12px;
	padding: 22px 24px;
	margin: 24px 0 20px;
	box-shadow: 0 2px 8px rgba(24, 20, 14, 0.04);
}

.rh-product-call-cta__badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--rh-call-terracotta);
	background: #fdf2ed;
	padding: 4px 9px;
	border-radius: 4px;
	margin-bottom: 8px;
}

.rh-product-call-cta__badge svg {
	stroke: currentColor;
}

.rh-product-call-cta__title {
	font-family: var(--serif, 'Playfair Display', Georgia, serif);
	font-size: 19px;
	font-weight: 600;
	color: var(--rh-call-ink);
	margin: 0 0 6px;
	line-height: 1.25;
}

.rh-product-call-cta__desc {
	font-size: 13.5px;
	color: var(--rh-call-muted);
	margin: 0 0 16px;
	line-height: 1.5;
}

.rh-product-call-cta__actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.rh-product-call-btn {
	flex: 1;
	min-width: 170px;
	height: 42px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 13.5px;
	font-weight: 600;
	border-radius: 6px;
	text-decoration: none;
	cursor: pointer;
	padding: 0 14px;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.rh-product-call-btn svg {
	flex-shrink: 0;
	stroke: currentColor;
}

.rh-product-call-btn--call {
	background-color: #ffffff;
	color: var(--rh-call-forest-green) !important;
	border: 1.5px solid var(--rh-call-forest-green);
}

.rh-product-call-btn--call:hover {
	background-color: #f1f6f3;
	color: var(--rh-call-forest-green-dark) !important;
	transform: translateY(-1px);
	text-decoration: none;
}

.rh-product-call-btn--callback {
	background-color: var(--rh-call-terracotta);
	color: #ffffff !important;
	border: 1.5px solid var(--rh-call-terracotta);
}

.rh-product-call-btn--callback:hover {
	background-color: var(--rh-call-terracotta-dark);
	border-color: var(--rh-call-terracotta-dark);
	color: #ffffff !important;
	transform: translateY(-1px);
}
