/*
Theme Name: Turquoise Travel
Theme URI: https://turquoise-travel.co.uk/
Description: Child theme of Twentig One for Turquoise Travel. Holds the brand palette, self-hosted Raleway, block patterns (one per section plus a full home page) and a small amount of CSS. Pair with the Twentig plugin.
Author: Turquoise Engineering
Template: twentig-one
Version: 0.1.0
Requires at least: 6.9
Requires PHP: 8.0
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: turquoise-travel
*/

/*
 * Design rules for this file
 * --------------------------
 * 1. Colour, fonts and element styles live in theme.json. Layout and spacing live in block
 *    attributes (and Twentig's block options). This file only holds what blocks can't express.
 * 2. No breakpoint rules unless unavoidable. Type and spacing scale with the parent's fluid
 *    presets (clamp()), cards reflow with CSS grid (minimumColumnWidth), and columns stack
 *    with Twentig's twStack. Breakpoints when they are needed: 600 / 782 / 1024px.
 */

/* ---------------------------------------------------------------------------
 * Block style: Blob (core/image)
 * The brand blob is one SVG stretched over the image box, so it works at any
 * aspect ratio. Set the ratio on the Image block (Dimensions > Aspect ratio).
 * ------------------------------------------------------------------------- */
.is-style-tt-blob img {
	width: 100%;
	-webkit-mask: url("assets/img/blob.svg") center / 100% 100% no-repeat;
	mask: url("assets/img/blob.svg") center / 100% 100% no-repeat;
}

/* A second blob overlapping the first. Percentages are of the column width, so the overlap
   scales with the layout. Put the "Overlap" class on the second Image block. */
.wp-block-image.tt-overlap {
	position: relative;
	width: 56%;
	margin-block-start: -25%;
	margin-inline: auto 3%;
}

.wp-block-image.tt-overlap.tt-overlap--left {
	margin-inline: 0 auto;
	margin-block-start: -34%;
	width: 62%;
}

/* ---------------------------------------------------------------------------
 * Block style: Eyebrow (core/paragraph) - small uppercase label above headings
 * ------------------------------------------------------------------------- */
.is-style-tt-eyebrow {
	margin-block-end: 0;
	color: var(--wp--preset--color--dark-pink);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 800;
	letter-spacing: 0.01em;
	line-height: 1.3;
	text-transform: uppercase;
}

/* ---------------------------------------------------------------------------
 * Block style: Card (core/group) - the white / coloured rounded boxes.
 * Flex column so a trailing Buttons block can sit at the bottom of equal-height cards.
 * ------------------------------------------------------------------------- */
.is-style-tt-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	border-radius: var(--tt-radius, 1rem);
}

.is-style-tt-card > .wp-block-buttons:last-child {
	margin-block-start: auto;
	padding-block-start: var(--wp--preset--spacing--20);
}

:root {
	--tt-radius: 1rem;
}

/* ---------------------------------------------------------------------------
 * Helper: stops an Icon (or any flex child) shrinking beside long text
 * ------------------------------------------------------------------------- */
.tt-no-shrink {
	flex-shrink: 0;
}

/* ---------------------------------------------------------------------------
 * Enquiry form. The pattern ships a disabled placeholder form so the layout can be reviewed
 * without Kadence; these rules style that placeholder. When the Kadence Advanced Form block
 * replaces it, restyle through the Kadence form's own style controls.
 * ------------------------------------------------------------------------- */
.tt-form {
	display: grid;
	gap: var(--wp--preset--spacing--20);
}

.tt-form label {
	display: grid;
	gap: 0.4rem;
	color: var(--wp--preset--color--dark-turquoise);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
}

.tt-form__row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
	gap: var(--wp--preset--spacing--20);
}

.tt-form input,
.tt-form textarea {
	width: 100%;
	padding: 0.65rem 0.9rem;
	border: 1px solid var(--wp--preset--color--grey);
	border-radius: 0.75rem;
	background: var(--wp--preset--color--base);
	font: inherit;
}

.tt-form button {
	justify-self: start;
	padding: 0.7rem 1.4rem;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--light-pink);
	color: var(--wp--preset--color--dark-turquoise);
	font: inherit;
	font-weight: 700;
}

/* ---------------------------------------------------------------------------
 * Icon + text row that wraps without a breakpoint: the text keeps at least 14rem, so on
 * narrow cards the icon sits above it instead of squeezing the copy into a thin column.
 * ------------------------------------------------------------------------- */
.tt-media-row > .tt-media-row__text {
	flex: 1 1 14rem;
	min-width: 0;
}

/* Keeps short button labels (header call to action) on one line. */
.tt-nowrap .wp-block-button__link {
	white-space: nowrap;
}
