/* ============================================
   SabalSign Theme - Main Stylesheet
   Replicates the original React site design
   ============================================ */

:root {
	--brand-primary: #428212;
	--brand-primary-rgb: 66, 130, 18;
	--brand-secondary: #83bb51;
	--brand-gradient-dark: linear-gradient(270deg, #428212 0%, rgba(131, 187, 81, 0.00) 100%);
	--brand-gradient-dark-90: linear-gradient(270deg, #428212 0%, rgba(131, 187, 81, 0.00) 90%);

	--surface-light-1: #f8f9fa;
	--neutral-white: #ffffff;

	--text-dark: #1f2937;
	--text-dark-3: #374151;
	--text-dark-7: #9ca3af;
	--text-light-7: #d1d5db;

	--action-base: rgb(5, 114, 165);
	--action-hovered: rgb(5, 114, 165);
	--action-pressed: #2a550b;
	--secondary-lightest: #f0f7e8;
	--secondary-lighter: #c5e0a5;

	--font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;

	--header-height: 58px;
}

/* ============================================
   Reset & Base
   ============================================ */

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

html {
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	font-family: var(--font-family);
	color: var(--text-dark-3);
	background-color: var(--surface-light-1);
	line-height: 1.5;
	width: 100%;
	min-height: 100vh;
	overflow-x: hidden;
}

a {
	color: var(--brand-primary);
	text-decoration: none;
	transition: color 0.15s ease;
}

a:hover {
	color: var(--action-hovered);
	text-decoration: underline;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ============================================
   Site Wrapper
   ============================================ */

.site-wrapper {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* ============================================
   Header
   ============================================ */

.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	height: var(--header-height);
	background: var(--neutral-white);
	border-bottom: 3px solid var(--brand-primary);
	flex-shrink: 0;
}

@media (min-width: 768px) {
	.site-header {
		border-bottom-width: 4px;
	}
}

.header-nav {
	width: 100%;
	height: 100%;
}

.header-inner {
	max-width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 1rem;
	position: relative;
}

@media (min-width: 1024px) {
	.header-inner {
		padding-left: 2rem;
		padding-right: 2rem;
	}
}

.header-left {
	display: flex;
	align-items: flex-end;
	padding: 0 0.5rem;
}

@media (min-width: 768px) {
	.header-left {
		padding: 0;
	}
}

.site-logo-link {
	flex-shrink: 0;
	align-self: center;
	display: block;
}

.site-logo {
	max-height: 38px;
	width: auto;
}

/* Header accent stripes */
.header-accent {
	position: absolute;
	right: 75px;
	top: -6px;
	height: 60px;
	overflow: hidden;
	background: var(--neutral-white);
	float: right;
	margin: 0;
	padding: 0;
}

.accent-container {
	height: var(--header-height);
	display: flex;
}

.accent-stripe {
	width: 8.7625rem;
	height: 2.25rem;
	transform: rotate(-60deg);
	background: var(--brand-gradient-dark);
}

.accent-stripe--offset {
	margin-left: -103px;
	background: var(--brand-gradient-dark-90);
}

.header-right {
	position: relative;
	margin-left: 1rem;
	flex-shrink: 0;
}

.info-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1px solid var(--text-dark-3);
	background: var(--surface-light-1);
	color: var(--text-dark-3);
	cursor: pointer;
	transition: all 0.15s ease;
	font-size: 14px;
}

.info-button:hover {
	border-color: var(--brand-primary);
	background: #f1f5f9;
	color: var(--brand-primary);
}

.info-button svg {
	width: 20px;
	height: 20px;
}

/* Info dropdown menu */
.info-menu-wrapper {
	position: relative;
}

.info-menu {
	position: absolute;
	right: 0;
	z-index: 10;
	margin-top: 10px;
	width: 270px;
	transform-origin: top right;
	border-radius: 0.375rem;
	background: var(--neutral-white);
	padding: 0.25rem 0.5rem;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
	ring: 1px solid rgba(0, 0, 0, 0.05);
	border: 1px solid rgba(0, 0, 0, 0.05);
	opacity: 0;
	transform: scale(0.95);
	transition: opacity 0.1s ease, transform 0.1s ease;
	pointer-events: none;
}

.info-menu[hidden] {
	display: block;
	visibility: hidden;
	opacity: 0;
	transform: scale(0.95);
	pointer-events: none;
}

.info-menu.is-open {
	visibility: visible;
	opacity: 1;
	transform: scale(1);
	pointer-events: auto;
}

.info-menu__item {
	display: flex;
	align-items: center;
	padding: 0.5rem 1rem;
	font-size: 1rem;
	color: var(--action-base);
	text-decoration: none;
	border-radius: 0.25rem;
	transition: background 0.1s ease;
}

.info-menu__item:hover {
	background: var(--surface-light-1);
	color: var(--action-hovered);
	text-decoration: none;
}

.info-menu__item svg {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	color: var(--text-dark-7);
}

.info-menu__item span {
	margin-left: 8px;
	color: var(--action-base);
}

/* ============================================
   Content Area
   ============================================ */

.site-content-area {
	flex: 1;
	margin-top: var(--header-height);
	background: var(--surface-light-1);
	overflow-y: auto;
	overflow-x: hidden;
}

.site-content-inner {
	width: 100%;
	min-height: calc(100vh - var(--header-height));
}

.main-content {
	width: 100%;
	min-height: 100%;
}

/* ============================================
   Home Page
   ============================================ */

.home-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 1.5rem 1rem 0;
}

@media (min-width: 768px) {
	.home-container {
		padding: 1.5rem 1.5rem 0;
	}
}

.hero-section {
	margin: 2.5rem 0;
}

.hero-image-wrapper {
	display: flex;
	justify-content: center;
}

.hero-image--desktop {
	display: none;
	margin: 0 auto 1rem;
}

.hero-image--mobile {
	display: block;
	margin: 0 auto 1rem;
}

@media (min-width: 768px) {
	.hero-image--desktop {
		display: block;
		height: 50vh;
		width: 70vh;
		object-fit: contain;
	}

	.hero-image--mobile {
		display: none;
	}
}

.home-content {
	width: 100%;
	max-width: 64rem;
	text-align: left;
}

.home-title {
	font-size: 1.25rem;
	font-weight: 500;
	margin-bottom: 1rem;
	color: var(--text-dark);
}

.home-text {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.home-text p {
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--text-dark-3);
}

/* Actions section */
.home-actions {
	margin-top: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

@media (min-width: 768px) {
	.home-actions {
		flex-direction: row;
		align-items: flex-end;
	}
}

.location-picker {
	width: 100%;
}

@media (min-width: 768px) {
	.location-picker {
		width: 15rem;
	}
}

.location-label {
	display: block;
	font-size: 0.875rem;
	font-weight: 500;
	margin-bottom: 0.5rem;
	color: var(--text-dark-3);
}

.select-wrapper {
	position: relative;
	z-index: 1;
}

.select-native {
	display: block;
	width: 100%;
	border-radius: 0.25rem;
	border: 1px solid var(--text-light-7);
	background: var(--neutral-white);
	padding: 0.5rem 2rem 0.5rem 0.5rem;
	font-family: var(--font-family);
	font-size: 0.875rem;
	color: var(--text-dark-3);
	cursor: pointer;
	transition: border-color 0.15s ease;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512' fill='%23374151'%3E%3Cpath d='M201.4 342.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 274.7 86.6 137.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.5rem center;
	background-size: 1rem;
}

.select-native:hover {
	border-color: var(--brand-primary);
}

.select-native:focus {
	outline: none;
	border-color: var(--brand-primary);
	box-shadow: 0 0 0 1px var(--brand-primary);
}

/* Action Buttons */
.action-buttons {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

@media (min-width: 768px) {
	.action-buttons {
		flex-direction: row;
	}
}

/* ============================================
   Buttons
   ============================================ */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	font-family: var(--font-family);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, outline-color 0.15s ease;
	white-space: nowrap;
}

.btn__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2px 5px;
	width: 20px;
}

.btn__icon svg {
	height: 16px;
	width: auto;
}

.btn__text {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2px 4px;
	line-height: 1;
}

/* Primary button (filled green) */
.btn--primary {
	background: var(--action-base);
	color: var(--neutral-white);
	padding: 3px;
	border: 2px solid transparent;
	border-radius: 6px;
	outline: 2px solid transparent;
	outline-offset: 2px;
}

.btn--primary .btn__icon,
.btn--primary .btn__text {
	color: var(--neutral-white);
}

.btn--primary:hover {
	background: #e8edf0;
	border-color: transparent;
	color: var(--action-hovered);
	text-decoration: none;
	outline-color: rgb(5, 114, 165);
}

.btn--primary:hover .btn__icon,
.btn--primary:hover .btn__text {
	color: var(--action-hovered);
	text-decoration: underline;
}

.btn--primary:active {
	background: #e8edf0;
	border-color: transparent;
	outline-color: transparent;
}

.btn--primary:active .btn__text {
	text-decoration: none;
}

/* Outline button */
.btn--outline {
	background: transparent;
	color: var(--action-base);
	padding: 3px;
	border: 2px solid var(--action-base);
	border-radius: 6px;
	outline: 2px solid transparent;
	outline-offset: 2px;
}

.btn--outline .btn__icon,
.btn--outline .btn__text {
	color: var(--action-base);
}

.btn--outline:hover {
	background: #e8edf0;
	border-color: var(--action-hovered);
	color: var(--action-hovered);
	text-decoration: none;
	outline-color: #bcd8e5;
}

.btn--outline:hover .btn__icon,
.btn--outline:hover .btn__text {
	color: var(--action-hovered);
	text-decoration: underline;
}

.btn--outline:active {
	background: #e8edf0;
	border-color: var(--action-pressed);
	outline-color: transparent;
}

.btn--outline:active .btn__text {
	text-decoration: none;
}

/* Content divider */
.content-divider {
	position: relative;
	margin: 1rem 0;
}

.content-divider::after {
	content: '';
	display: block;
	width: 100%;
	border-top: 1px solid var(--text-light-7);
}

/* ============================================
   Legal Pages (Terms & Privacy)
   ============================================ */

.legal-page {
	max-width: 64rem;
	width: 100%;
	margin: 0 auto;
	padding: 1.5rem 1rem;
}

@media (min-width: 768px) {
	.legal-page {
		padding: 1.5rem;
	}
}

.legal-header {
	display: flex;
	align-items: center;
	margin-bottom: 1.5rem;
}

.legal-header__image {
	height: 16rem;
	width: auto;
	margin-right: 1.5rem;
	flex-shrink: 0;
	display: none;
}

@media (min-width: 640px) {
	.legal-header__image {
		display: block;
	}
}

.legal-header__title {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--text-dark);
	margin-bottom: 0.25rem;
}

.legal-header__subtitle {
	font-size: 1.125rem;
	color: var(--text-dark-3);
	margin-top: 0.5rem;
}

.legal-header__date {
	font-size: 1.125rem;
	color: var(--text-dark-3);
}

.legal-header__image--square {
	width: 16rem;
	height: 16rem;
}

.legal-divider {
	border-top: 1px solid #d1d5db;
	margin-bottom: 1.5rem;
}

.legal-body {
	font-size: 1rem;
	line-height: 1.625;
	color: var(--text-dark-3);
}

.legal-body p {
	margin-bottom: 1rem;
}

.legal-bold-underline {
	font-weight: 700;
	text-decoration: underline;
}

.legal-heading {
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--text-dark);
	text-decoration: underline;
	margin-bottom: 0.5rem;
}

.legal-subheading {
	font-size: 1.125rem;
	font-weight: 400;
	color: var(--text-dark);
	margin-bottom: 0.5rem;
}

.legal-section {
	margin-bottom: 1rem;
}

.legal-body ul {
	list-style: disc inside;
	padding-left: 1rem;
	margin-bottom: 1rem;
}

.legal-body ul li {
	margin-bottom: 0.25rem;
}

.legal-body a {
	color: #0284c7;
	text-decoration: none;
}

.legal-body a:hover {
	text-decoration: underline;
}

.legal-numbered-list {
	list-style: decimal;
	padding-left: 1.25rem;
	margin-bottom: 1rem;
}

.legal-numbered-list > li {
	margin-bottom: 1rem;
	padding-left: 0.25rem;
}

/* Legacy legal-container for generic pages */
.legal-container {
	max-width: 64rem;
	margin: 0 auto;
	padding: 1.5rem 1rem;
}

@media (min-width: 768px) {
	.legal-container {
		padding: 1.5rem;
	}
}

.legal-title {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--text-dark);
	margin-bottom: 0.5rem;
}

.legal-subtitle {
	font-size: 1rem;
	font-weight: 500;
	color: var(--text-dark-3);
	margin-bottom: 0.25rem;
}

.legal-date {
	font-size: 0.875rem;
	color: var(--text-dark-7);
	margin-bottom: 1.5rem;
}

.legal-notice {
	background: var(--neutral-white);
	border: 1px solid var(--text-light-7);
	border-radius: 8px;
	padding: 1.5rem;
	margin-bottom: 2rem;
}

.legal-notice h2 {
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--text-dark);
	margin-bottom: 0.75rem;
}

.legal-notice p {
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--text-dark-3);
	margin-bottom: 0.75rem;
}

.legal-notice p:last-child {
	margin-bottom: 0;
}

.legal-notice ul {
	margin: 0.5rem 0 0.75rem 1.5rem;
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--text-dark-3);
}

.legal-notice ul li {
	margin-bottom: 0.25rem;
}

.legal-content {
	font-size: 1rem;
	line-height: 1.625;
	color: var(--text-dark-3);
}

.legal-content p {
	margin-bottom: 1rem;
}

.legal-content h3 {
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--text-dark);
	text-decoration: underline;
	margin-top: 1rem;
	margin-bottom: 0.5rem;
}

.legal-content h4 {
	font-size: 1.125rem;
	font-weight: 400;
	color: var(--text-dark);
	margin-top: 1rem;
	margin-bottom: 0.5rem;
}

.legal-content h5 {
	font-size: 1.125rem;
	font-weight: 400;
	color: var(--text-dark);
	margin-top: 1rem;
	margin-bottom: 0.5rem;
}

.legal-content ul,
.legal-content ol {
	list-style-position: inside;
	padding-left: 1rem;
	margin-bottom: 1rem;
}

.legal-content ul {
	list-style-type: disc;
}

.legal-content ul li,
.legal-content ol li {
	margin-bottom: 0.25rem;
}

.legal-content a {
	color: #0284c7;
	text-decoration: none;
}

.legal-content a:hover {
	text-decoration: underline;
}

.legal-important {
	font-weight: 500;
	background: #fefce8;
	border-left: 4px solid var(--brand-primary);
	padding: 1rem 1.25rem;
	margin: 1.5rem 0;
	border-radius: 0 4px 4px 0;
}

.legal-list {
	counter-reset: legal-counter;
	list-style: none;
	margin-left: 0;
	padding-left: 0;
}

.legal-list > li {
	counter-increment: legal-counter;
	margin-bottom: 1.5rem;
	padding-left: 2rem;
	position: relative;
}

.legal-list > li::before {
	content: counter(legal-counter) ".";
	position: absolute;
	left: 0;
	font-weight: 700;
	color: var(--brand-primary);
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
	background: var(--neutral-white);
	border-top: 1px solid var(--text-light-7);
	padding: 1.5rem 1rem;
	flex-shrink: 0;
}

.footer-inner {
	max-width: 64rem;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
}

@media (min-width: 768px) {
	.footer-inner {
		flex-direction: row;
		justify-content: space-between;
	}
}

.footer-links {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
}

.footer-links a {
	color: var(--brand-primary);
	text-decoration: none;
}

.footer-links a:hover {
	text-decoration: underline;
	color: var(--action-hovered);
}

.footer-separator {
	color: var(--text-light-7);
}

.footer-copyright {
	font-size: 0.8125rem;
	color: var(--text-dark-7);
}

/* ============================================
   WordPress Admin Bar Adjustment
   ============================================ */

.admin-bar .site-header {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

/* ============================================
   Utility: Screen reader only
   ============================================ */

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}
