/*
Theme Name: SwaraBols
Theme URI: https://swarabols.com
Author: Prasannah Jeyandran
Description: Custom block theme for SwaraBols, a family-run school for Carnatic vocal and violin, and Hindustani Tabla. Live classes on Zoom and recorded courses.
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 8.0
Version: 1.1.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: swarabols
*/

/* Small refinements that theme.json cannot express. Keep this file short. */

/* Cards lift gently on hover */
.is-style-sb-card {
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.is-style-sb-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 28px rgba(31, 77, 58, 0.12);
}

/* Gold hairline divider with a small diamond, echoing the logo */
.sb-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 260px;
	margin-inline: auto;
}
.sb-divider::before,
.sb-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--wp--preset--color--accent);
}
.sb-divider span {
	width: 9px;
	height: 9px;
	background: var(--wp--preset--color--accent);
	transform: rotate(45deg);
}

/* Sticky header */
.sb-header {
	position: sticky;
	top: 0;
	z-index: 50;
}
body.admin-bar .sb-header {
	top: 32px;
}
@media (max-width: 782px) {
	body.admin-bar .sb-header {
		top: 46px;
	}
}

/* Keep the logo crisp and sized */
.sb-logo img {
	height: auto;
	max-height: 56px;
	width: auto;
}

/* Tamil text falls back to good system fonts */
:lang(ta) {
	font-family: "Noto Sans Tamil", "Nirmala UI", "Latha", var(--wp--preset--font-family--body);
}

/* Visible focus for keyboard users */
a:focus-visible,
button:focus-visible,
.wp-element-button:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

/* No cream gap between header, page content and footer */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* Cards in a row are always the same height */
.wp-block-column:has(> .is-style-sb-card) {
	display: flex;
	flex-direction: column;
}
.wp-block-column > .is-style-sb-card {
	flex: 1 1 auto;
}

/* ---------- Teacher cards (from Teachers in wp-admin) ---------- */
.sb-teacher-grid > li {
	display: flex;
}
.sb-teacher-grid > li > .is-style-sb-card {
	flex: 1 1 auto;
	text-align: center;
}
.sb-teacher-grid .sb-portrait {
	margin-inline: auto;
}
.sb-teacher-grid .sb-portrait img,
.sb-portrait img {
	border-radius: 50%;
	border: 3px solid var(--wp--preset--color--tint);
}
.sb-teacher-grid .wp-block-post-title a {
	color: inherit;
	text-decoration: none;
}
.sb-subjects {
	color: var(--wp--preset--color--accent-deep);
	font-weight: 500;
}
.sb-role {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.75rem !important;
	color: var(--wp--preset--color--muted);
}
.sb-teacher-photo img {
	border-radius: 20px;
}
@media (max-width: 781px) {
	.sb-teacher-grid.is-layout-grid {
		grid-template-columns: 1fr;
	}
}

/* ---------- FAQ ---------- */
.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--tint);
	padding: 1rem 0;
}
.wp-block-details summary {
	cursor: pointer;
	font-weight: 500;
	color: var(--wp--preset--color--ink);
}
.wp-block-details[open] summary {
	margin-bottom: 0.5rem;
}
[id] {
	scroll-margin-top: 110px;
}

/* ---------- Enquiry and free-trial form ---------- */
.sb-form__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 1.25rem;
}
.sb-field {
	margin: 0 0 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}
.sb-field--wide {
	grid-column: 1 / -1;
}
.sb-field label {
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--wp--preset--color--ink);
}
.sb-field label span {
	color: var(--wp--preset--color--accent-deep);
}
.sb-field input:not([type="checkbox"]),
.sb-field select,
.sb-field textarea {
	font: inherit;
	font-size: 1rem;
	color: var(--wp--preset--color--ink);
	background: #fff;
	border: 1px solid #C9D3CC;
	border-radius: 10px;
	padding: 0.7rem 0.85rem;
	width: 100%;
	box-sizing: border-box;
}
.sb-field input:focus,
.sb-field select:focus,
.sb-field textarea:focus {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--primary);
}
.sb-field--check {
	flex-direction: row;
	align-items: flex-start;
	gap: 0.6rem;
}
.sb-field--check input {
	margin-top: 0.3rem;
	width: 1.1rem;
	height: 1.1rem;
	accent-color: var(--wp--preset--color--primary);
	flex: none;
}
.sb-field--check label {
	font-weight: 400;
	font-size: 0.9rem;
}
.sb-form__submit {
	margin: 0.5rem 0 0;
}
.sb-form__submit button {
	cursor: pointer;
	border: 0;
	width: 100%;
}
.sb-form__submit button[disabled] {
	opacity: 0.6;
	cursor: wait;
}
.sb-form-notice {
	border-radius: 12px;
	padding: 1rem 1.25rem;
	margin-bottom: 1.25rem;
}
.sb-form-notice p {
	margin: 0.25rem 0;
}
.sb-form-notice--ok {
	background: var(--wp--preset--color--tint);
	border-left: 4px solid var(--wp--preset--color--primary);
}
.sb-form-notice--error {
	background: #FBEFE6;
	border-left: 4px solid #B5541C;
}
/* Spam trap: hidden from people, visible to bots */
.sb-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
@media (max-width: 600px) {
	.sb-form__grid {
		grid-template-columns: 1fr;
	}
}

/* ---------- Phones ---------- */
.sb-header .wp-block-button__link {
	white-space: nowrap;
}
@media (max-width: 600px) {
	.sb-logo img {
		max-height: 44px;
	}
	.sb-header .wp-block-image.sb-logo {
		max-width: 170px;
	}
	/* The logo is already in the header; keep the phone hero short and to the point. */
	.sb-hero-art {
		display: none;
	}
}
