/**
 * OAB theme CSS — only what theme.json cannot express.
 * All values replicate the original oldamericanbusiness.com site.
 */

/* ---------- Header ---------- */
.oab-header__inner {
	align-items: center;
}

.oab-header__inner > .wp-block-site-title {
	flex: 0 0 30%;
	margin: 0;
}

.oab-header__inner > .wp-block-navigation {
	flex: 1 1 auto;
	justify-content: center;
}

.oab-header__inner > .oab-account {
	flex: 0 0 30%;
}

.oab-header .wp-block-navigation .wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	margin: -6px;
	padding: 6px;
	white-space: nowrap;
}

.oab-header .wp-block-navigation .wp-block-navigation-item__content::before {
	content: "";
	display: inline-block;
	width: 0.5em;
	height: 1px;
	margin-right: 0.5em;
	background-color: rgb(27, 27, 27);
	vertical-align: middle;
	opacity: 0;
	transition: inherit;
}

.oab-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content::before {
	background-color: rgb(119, 119, 119);
	opacity: 1;
	transform: translateY(-100%);
}

.oab-header .wp-block-navigation .wp-block-navigation-item__content:active {
	color: rgb(0, 0, 0);
}

@media (min-width: 1536px) {

	.oab-header .wp-block-site-title {
		font-size: 24px;
	}

	.oab-header .wp-block-navigation {
		font-size: 14px;
	}
}

@media (max-width: 781px) {

	.oab-header__inner > .wp-block-site-title {
		flex: 1 1 auto;
		font-size: 16px;
	}

	.oab-header__inner > .oab-account {
		flex: 0 0 auto;
	}
}

/* ---------- Sections ---------- */
.oab-section {
	margin-block-start: 0;
	padding-block: 56px;
}

.oab-section > .wp-block-heading:first-child + * {
	margin-block-start: 40px;
}

/* An h1 that looks like a section title (The Company, Team OAB Work). */
.wp-block-heading.oab-section-title {
	font-family: var(--wp--preset--font-family--quicksand);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 400;
	letter-spacing: 0.091em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--wp--preset--color--header-text);
}

.wp-block-columns.oab-columns {
	gap: 48px;
}

.oab-columns .wp-block-column > * + * {
	margin-block-start: 24px;
}

.oab-columns .wp-block-image img {
	width: 100%;
}

/* ---------- Welcome (below slider) ---------- */
.oab-welcome {
	margin-block-start: 0;
	padding-block: 28px 56px;
}

/* ---------- Sign up (cover) ---------- */
.oab-signup {
	margin-block-start: 0;
	padding-block: 56px;
}

.oab-signup .wp-block-cover__background.has-background-dim {
	opacity: 0.26;
}

.oab-signup .wp-block-heading.oab-signup__title {
	font-family: var(--wp--preset--font-family--muli);
	font-size: var(--wp--preset--font-size--x-large);
	letter-spacing: 0.023em;
	line-height: 1.2;
	text-transform: none;
	color: var(--wp--preset--color--base);
}

/* ---------- Contact hero ---------- */
.wp-block-columns.oab-contact-hero {
	margin-block: 0;
}

.oab-contact-hero__text {
	padding: 0 56px;
}

.oab-contact-hero__text .has-large-font-size {
	line-height: 1.5;
}

/* ---------- WhatsApp button (slate, with icon) ---------- */
.wp-block-button.oab-whatsapp-button .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 0;
	background-color: var(--wp--preset--color--slate);
	color: var(--wp--preset--color--base);
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	letter-spacing: normal;
	line-height: 40px;
	text-transform: none;
}

.wp-block-button.oab-whatsapp-button .wp-block-button__link:hover {
	background-color: rgb(79, 102, 114);
	color: var(--wp--preset--color--base);
}

.wp-block-button.oab-whatsapp-button .wp-block-button__link::before {
	content: "";
	width: 24px;
	height: 24px;
	background: url("../icons/whatsapp.svg") center / contain no-repeat;
}

/* ---------- Social icons ---------- */
.oab-social {
	gap: 0;
}

.oab-social .wp-block-image {
	margin: 0;
}

.oab-social--large .wp-block-image a {
	display: block;
	padding: 4px 24px;
}

.oab-social--large .wp-block-image img {
	width: 48px;
	height: 48px;
}

.oab-social--small .wp-block-image a {
	display: block;
	padding: 6px;
}

.oab-social--small .wp-block-image img {
	width: 28px;
	height: 28px;
}

/* ---------- Footer ---------- */
.oab-footer {
	padding: 56px 40px;
}

.oab-footer__row {
	display: grid;
	grid-template-columns: 85% 15%;
	align-items: center;
}

.oab-footer__row .oab-social {
	justify-content: flex-start;
}

.oab-footer__copyright,
.oab-footer__links a {
	font-size: 14px;
	letter-spacing: 0.167em;
	line-height: 1.5;
	text-transform: uppercase;
	color: var(--wp--preset--color--header-text);
}

.oab-footer__copyright {
	margin: 0;
}

.wp-block-group.oab-footer__links {
	gap: 0;
	margin-block-start: 48px;
}

.oab-footer__links p {
	margin: 0;
	line-height: 1;
}

.oab-footer__links a {
	display: inline-block;
	padding: 8px;
	line-height: normal;
}

.oab-footer__links a:hover {
	text-decoration: none;
	color: var(--wp--preset--color--header-hover);
}

@media (max-width: 781px) {

	.oab-footer {
		padding-inline: 24px;
	}

	.oab-footer__row {
		grid-template-columns: 1fr;
		gap: 16px;
		text-align: center;
	}

	.oab-footer__row .oab-social {
		justify-content: center;
	}
}

/* ---------- Floating chat bubble ---------- */
:root {
	/* oab-core's cookie notice opens beside the bubble: 24px + 65px + 16px gap. */
	--oab-cookie-notice-right: 105px;
}

.oab-chat-bubble {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 1000;
	display: block;
	width: 65px;
	height: 65px;
}

.oab-chat-bubble img {
	display: block;
	width: 100%;
	height: 100%;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

/* ---------- Forms (theme login form + oab-core forms) ---------- */
.oab-form {
	display: grid;
	gap: 24px;
}

.oab-field {
	position: relative;
}

.oab-field__input {
	box-sizing: border-box;
	width: 100%;
	height: 52px;
	padding: 23px 16px 7px;
	border: 1px solid rgba(119, 119, 119, 0.5);
	border-radius: 0;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--field-text);
	font-family: var(--wp--preset--font-family--quicksand);
	font-size: 16px;
}

textarea.oab-field__input {
	height: 202px;
	padding: 16px;
	line-height: 28px;
	resize: vertical;
}

.oab-field__label {
	position: absolute;
	top: 16px;
	left: 16px;
	color: var(--wp--preset--color--field-text);
	font-size: 16px;
	line-height: 20px;
	pointer-events: none;
	transition: transform 0.15s ease, font-size 0.15s ease;
}

.oab-field__input:focus + .oab-field__label,
.oab-field__input:not(:placeholder-shown) + .oab-field__label {
	font-size: 12px;
	transform: translateY(-10px);
}

textarea.oab-field__input:focus + .oab-field__label,
textarea.oab-field__input:not(:placeholder-shown) + .oab-field__label {
	opacity: 0;
}

.oab-form .wp-element-button {
	width: 100%;
	cursor: pointer;
}

.oab-form--apply .oab-form__submit,
.oab-form--contact .oab-form__submit {
	margin-top: 16px;
}

.oab-form__submit--center {
	text-align: center;
}

.oab-form__submit--center .wp-element-button {
	width: auto;
}

.oab-form__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: var(--wp--preset--color--black);
}

.oab-form__attach {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	cursor: pointer;
}

.oab-form__attach input[type="file"] {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.oab-form__count {
	font-size: 14px;
	color: var(--wp--preset--color--header-text);
}

.oab-form__checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--wp--preset--color--body-text);
}

.oab-form__honeypot {
	position: absolute;
	left: -9999px;
}

.oab-form__notice {
	margin: 0;
	padding: 12px 16px;
	border: 1px solid currentColor;
	font-size: 16px;
}

/* Sign up (inline, white on photo) */
.oab-form--signup {
	display: flex;
	gap: 24px;
	align-items: stretch;
}

.oab-form--signup .oab-field {
	flex: 1 1 auto;
}

.oab-form--signup .oab-field__input {
	height: 56px;
	border-color: var(--wp--preset--color--base);
	background: transparent;
	color: var(--wp--preset--color--base);
}

.oab-form--signup .oab-field__label {
	color: var(--wp--preset--color--base);
}

.oab-form--signup .wp-element-button {
	width: auto;
	border-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--base);
}

.oab-form--signup .wp-element-button:hover {
	border-color: rgb(64, 64, 64);
	background-color: rgb(64, 64, 64);
	color: var(--wp--preset--color--base);
}

@media (max-width: 600px) {

	.oab-form--signup {
		flex-direction: column;
	}
}

/* ---------- Login (Team OAB Work) ---------- */
/* Layout of the oab-core account screens (sign in, create account, set password, my account). */
.oab-account-view > * {
	margin-block: 0;
}

.oab-account-view > .oab-section-title + * {
	margin-block-start: 24px;
}

.oab-account-view--register > .oab-section-title + *,
.oab-account-view--setpassword > .oab-section-title + * {
	margin-block-start: 40px;
}

.oab-account-view > * + .oab-form,
.oab-account-view > .oab-form + * {
	margin-block-start: 24px;
}

.oab-account-view > .oab-account-view__link + .oab-account-view__alt {
	margin-block-start: 40px;
}

.oab-form--account .oab-field__input {
	height: 54px;
}

.oab-account-view a {
	color: var(--wp--preset--color--black);
	text-decoration: none;
}

.oab-account-view a:hover {
	text-decoration: underline;
}

.oab-account-view__link {
	text-align: center;
}

.oab-account-view__check {
	display: grid;
	justify-items: center;
	gap: 24px;
	max-width: 360px;
	margin-inline: auto;
	padding-block: 120px;
}

.oab-account-view__check > * {
	margin: 0;
}

.oab-account-view__icon {
	color: var(--wp--preset--color--black);
}

/* My account */
.oab-account-view__grid {
	display: grid;
	grid-template-columns: 213px 1fr;
	align-items: start;
	margin-block-start: 48px;
}

.oab-account-view__nav {
	margin: 0;
	font-weight: 700;
	color: var(--wp--preset--color--black);
}

.oab-account-view__main > * {
	margin-block: 0;
}

.oab-account-view__main > * + * {
	margin-block-start: 24px;
}

.oab-account-view__alert {
	padding: 14px 16px;
	background-color: rgb(74, 74, 74);
	color: var(--wp--preset--color--black);
	font-weight: 700;
	text-align: center;
}

.oab-account-view__name {
	font-family: var(--wp--preset--font-family--quicksand);
	font-size: 36px;
	font-weight: 400;
	letter-spacing: normal;
	line-height: 1.25;
	text-transform: none;
	color: var(--wp--preset--color--contrast);
}

.oab-account-view__details {
	display: grid;
	gap: 2px;
}

.oab-account-view__details dt {
	color: var(--wp--preset--color--contrast);
}

.oab-account-view__details dd {
	margin: 0 0 20px;
}

.oab-account-view__edit a {
	color: var(--wp--preset--color--contrast);
}

.oab-form--profile {
	grid-template-columns: 1fr 1fr;
	column-gap: 48px;
	row-gap: 48px;
}

.oab-form--profile > .oab-form__notice,
.oab-form--profile > .oab-form__submit {
	grid-column: 1 / -1;
}

.oab-form--profile > .oab-form__submit {
	margin-top: -8px;
}

.oab-form--profile .wp-element-button {
	width: auto;
}

/* Profile fields show only their value once filled, like the original (label stays for screen readers). */
.oab-form--profile .oab-field__input:not(:placeholder-shown) {
	padding-block: 15px;
}

.oab-form--profile .oab-field__input:not(:placeholder-shown) + .oab-field__label {
	opacity: 0;
}

@media (max-width: 781px) {

	.oab-account-view__grid,
	.oab-form--profile {
		grid-template-columns: 1fr;
	}

	.oab-account-view__nav {
		margin-bottom: 24px;
	}
}

/* ---------- Business hours ---------- */
.oab-hours--today {
	min-height: 56px;
	text-align: center;
}

.oab-hours--today summary {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	cursor: pointer;
	list-style: none;
}

.oab-hours--today summary::-webkit-details-marker {
	display: none;
}

.oab-hours--today summary::after {
	content: "";
	width: 6px;
	height: 6px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
}

.oab-hours__today-value {
	color: var(--wp--preset--color--black);
}

.oab-hours table {
	border-collapse: collapse;
}

.oab-hours--today table {
	margin: 16px auto 0;
	text-align: left;
}

.oab-hours td {
	padding: 1px;
	line-height: 27px;
}

.oab-hours td + td {
	padding-left: 5px;
}

.oab-hours tr.is-today td {
	font-weight: 700;
}

/* ---------- Responsive ---------- */
@media (max-width: 781px) {

	h1.wp-block-heading:not(.oab-section-title),
	.oab-signup .wp-block-heading.oab-signup__title {
		font-size: 32px;
	}

	.oab-contact-hero__text {
		padding: 40px 24px;
	}

	.oab-contact-hero__text .has-large-font-size {
		font-size: 20px;
	}
}
