/*------------------------------------*\
    RESPONSIVE: tablets and phones
\*------------------------------------*/

/* Desktop sizes everything from html { font-size: 1vw }, so text and spacing shrink with the screen.
   Up to 1024px wide the base size is fixed instead, and the layouts below take over:
     tablets  768px to 1024px  bigger text, four columns become two
     phones   up to 767px      one column, smaller headings, margins and padding
   Loaded on every front end page after the block stylesheets (popina_responsive_styles() in functions.php)
   and kept out of the block editor, so editor previews always show the desktop layout. */

/* Touch screens have no pointer to follow */
@media (hover: none) {
	.cursor {
		display: none;
	}
}

/*------------------------------------*\
    Tablets and phones
\*------------------------------------*/

@media (max-width: 1024px) {

	html {
		font-size: 11.5px;
	}

	.wrapper.thin {
		width: calc(100% - 16rem);
	}

	/* Menus block: a set height for the background image with the word cloud in the middle of it, and the
	   tiles pulled up a little (the desktop pull-up would cover the whole image) */
	.menus-block .fw-img {
		height: 60vh;
	}
	.menus-block .fw-img img {
		height: 100%;
		object-fit: cover;
	}
	.menus-block .absolute.center {
		top: 30vh;
		left: 4rem;
		width: calc(100% - 8rem);
	}
	.menus-block .word-cloud ul {
		margin-right: auto;
	}
	.menus-block .word-cloud p,
	.menus-block .word-cloud p:last-child {
		width: 100%;
		margin: 0;
	}
	.menus-list.menu-pull-up {
		margin: -8rem auto 0;
	}

	/* Single menu pages: section images fit their column */
	.menu-img {
		max-width: 100%;
	}

	/* Header: a smaller logo and compact buttons, so both buttons fit beside the cart */
	#header .logo {
		width: 6.4rem;
	}
	.nav-buttons .btn {
		min-width: 0;
		padding: 0.6rem 1rem;
	}

	/* Footer: the contact, sitemap and social columns take the full width, with the logo panel below */
	.footer .wrapper {
		flex-direction: column;
	}
	.footer-left, .footer-right {
		width: 100%;
	}
	.footer-right svg {
		display: block;
		width: 40%;
		margin: 0 auto;
	}

	/* The open menu scrolls when it is taller than the screen (a phone held sideways) */
	.nav-menu {
		overflow-y: auto;
	}

	.quarters,
	.menus-list.four {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* Stretchy logo: its logo scales with the screen width, so the stage around it keeps its desktop sizes
	   in vw (desktop rem is 1vw) instead of following the fixed rem above */
	.stretch-inner {
		height: 80vw;
	}
	.stretchy-logo.collapsed svg {
		top: 10vw;
	}
	.collapsed .static-paths {
		transform: translateY(28vw);
	}
	.logo-observer {
		top: -56vw;
	}
	.parallax-container {
		top: 12vw;
	}
	.parallax-child {
		width: 100%;
		height: 55vw;
	}
	.pb44 {
		padding-bottom: 42vw;
	}

}

/*------------------------------------*\
    Phones
\*------------------------------------*/

@media (max-width: 767px) {

	/* Structure: main clears the shorter phone header (menus.css and the shop pages set their own) */

	main {
		padding-top: 4.4rem;
	}
	body:has(.menus-block) main, .single-menus main {
		padding-top: 0;
	}
	.woocommerce-page main {
		padding-top: 8rem;
	}

	.wrapper, .alignwide, .wrapper.thin {
		width: calc(100% - 4rem);
	}
	.wrapper.wide {
		width: calc(100% - 2rem);
	}

	.halves, .thirds, .quarters,
	.menus-list.three, .menus-list.four {
		grid-template-columns: minmax(0, 1fr);
		grid-row-gap: 2rem;
	}

	.w75 {
		width: 100%;
	}

	.p4 {
		padding: 2rem;
	}
	.pb16 {
		padding-bottom: 8rem;
	}

	/* Full-bleed (fixed) images: 10rem taller than desktop */
	.fixed-image.h100 {
		height: 66rem;
	}
	.fixed-image.h75 {
		height: 58rem;
	}
	.fixed-image.h50 {
		height: 50rem;
	}

	.absolute.top, .absolute.bottom,
	.full-bleed-image .absolute.center {
		left: 2rem;
		width: calc(100% - 4rem);
	}
	.absolute.top {
		top: 2rem;
	}
	.absolute.bottom {
		bottom: 2rem;
	}

	/* Typography */

	.large-text {
		font-size: 3.2rem;
	}

	/* Header: the menus button is in the burger menu, so only Book a Table stays */

	/* Smaller burger: 3.2rem by 2.4rem lines in a 1rem padded box (the nav panel starts the same size) */
	.outer-nav {
		padding: 1rem;
	}
	#burger {
		height: 2.4rem;
	}
	.burger-line, #burger:hover #burger-bottom {
		width: 3.2rem;
	}
	#burger-bottom {
		width: 2.4rem;
	}
	#burger-middle-two {
		top: 1.075rem;
		left: 0.2rem;
	}
	#header .nav {
		width: 5.2rem;
		height: 4.4rem;
	}
	#header .logo {
		width: 5.2rem;
	}
	.nav-buttons .btn-peach {
		display: none;
	}
	.nav-buttons .btn {
		margin-left: 0.5rem;
		min-width: 0;
		padding: 0.6rem 0.7rem;
	}
	.nav-buttons .btn svg {
		display: none;
	}
	#header-cart {
		margin-right: 0.5rem;
	}
	#header-cart svg {
		width: 1.9rem;
	}

	.nav-menu {
		padding: 8rem 2rem 2rem;
	}

	/* Footer */

	/* Footer: contact details, then Sitemap and Follow Us side by side, then back to top, terms and copyright */
	.footer-left {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-column-gap: 2rem;
	}
	.footer-contact {
		display: contents;
	}
	.footer-contact > * {
		grid-column: 1 / -1;
	}
	.footer-info {
		order: 2;
		margin-top: 2rem;
	}
	.footer-col {
		width: auto;
		margin-top: 2rem;
	}
	.footer-nav {
		padding-right: 0;
	}
	.footer-terms {
		width: 100%;
	}
	.footer-right svg {
		width: 50%;
	}
	.footer-top h2 {
		font-size: 2.6rem;
	}
	/* 16px or more, or iOS zooms the page when the field is tapped */
	#mailchimp-wrapper input[type=email] {
		width: 100%;
		font-size: 16px;
	}

	/* Half text half image (and other halves blocks): the image always comes first */

	.half-image.half-right {
		order: 0;
		margin-left: 0;
	}
	.half-image {
		width: 100%;
	}
	.half-right {
		text-align: left;
	}
	.half-text > .w75 + div {
		margin-top: 1rem;
	}

	/* Timeline: one column, with the dots and line down the left and each image above its text */

	.timeline .wrapper:before {
		left: calc(1.5rem - 0.5px);
	}
	.timeline-item {
		flex-direction: column;
		padding-left: 5rem;
		margin: 3rem 0;
	}
	.timeline-img, .timeline-content {
		width: 100%;
	}
	.timeline-item.even .timeline-img {
		order: -1;
	}
	.timeline-item.even .timeline-content {
		text-align: left;
	}
	.timeline-img img,
	.timeline-img.small img, .timeline-img.medium img, .timeline-img.large img {
		width: 100%;
		height: auto;
		margin: 0;
	}
	.timeline-content {
		margin-top: 1.5rem;
	}
	.dot {
		position: absolute;
		top: 0;
		left: 0;
	}
	.timeline-line {
		left: calc(1.5rem - 0.5px);
		height: 100%;
	}

	/* Markets: the list takes the full width; the side column of images is hidden */

	.markets-inner {
		display: block;
	}
	.markets-imgs {
		display: none;
	}
	.markets-list {
		max-width: none;
		padding-left: 0;
	}
	.market-inner.odd {
		padding-left: 0;
	}
	.market-inner .large-text {
		margin: 0 1rem;
	}
	.market-inner a {
		display: block;
		width: fit-content;
		margin-bottom: 1rem;
	}

	/* Word clouds: one centred column */

	.word-cloud ol {
		margin: 0 auto;
		width: 100%;
	}
	.word-cloud ol li {
		column-gap: 0.5rem;
	}
	.word-cloud ul {
		margin: 0 auto;
	}
	.word-cloud ul em {
		margin-left: 2rem;
	}
	.hero-image .word-cloud ul {
		margin-right: auto;
	}

	/* Image carousel: one slide with a peek of the next (js/image-carousel.js), arrows on the right */

	.image-carousel .wrapper {
		width: calc(100% - 4rem);
	}
	.image-carousel .swiper {
		transform: none;
	}
	.images-nav {
		margin-left: auto;
		display: block;
	}

	/* Accordion: image under the text */

	.accordion-inner {
		flex-direction: column;
	}
	.accordion .wyg {
		padding-right: 0;
	}
	.accordion-img {
		padding-left: 0;
		padding-top: 1rem;
	}
	.accordion-sub {
		min-width: 5rem;
	}

	/* Text */

	.wyg h1, .wyg .h1 {
		text-indent: 3rem;
	}
	.free-text .wyg, .free-text .wyg * {
		text-indent: 0;
	}
	.opening-times-inner p {
		padding-right: 2rem;
	}

	/* Menus block and single menu pages */

	.menus-block h1 {
		font-size: 3rem;
	}
	.menus-block .absolute.center {
		left: 2rem;
		width: calc(100% - 4rem);
	}
	.menus-block .word-cloud.h2 {
		font-size: 2rem;
	}
	.menus-list.menu-pull-up {
		margin: -4rem auto 0;
	}
	.menu-header {
		grid-row-gap: 0;
	}
	.menu-header-img img {
		height: 50vh;
	}
	.menu-title {
		padding: 7rem 0 4rem;
	}
	.menu-title h1 {
		font-size: 4.4rem;
		letter-spacing: -3px;
	}
	.menu-section-intro {
		width: auto;
		margin: 3rem 0;
	}
	.menu-detail .h4.text-right {
		text-align: left;
	}
	.menu-fixed, .menu-img {
		width: 100%;
	}
	.menu-img {
		margin-top: 3rem;
	}
	.menu-img img {
		width: 100%;
		height: 32rem;
		object-fit: cover;
	}
	.menu-items {
		margin-bottom: 6rem;
	}
	/* Price columns: room for four digits (10.00) and the header labels, never wrapping */
	.menu-col {
		width: 6rem;
		flex: none;
		white-space: nowrap;
	}

	/* News posts */

	.single-header-img {
		height: 60vh;
	}
	.single-header {
		padding: 4rem 2rem;
	}
	.single-header-inner {
		width: auto;
	}
	.single-header h1 {
		font-size: 3rem;
		letter-spacing: -3px;
	}
	.single-header .post-tagline {
		width: auto;
		margin-top: 3rem;
	}
	.single-top p {
		flex-wrap: wrap;
	}
	.single-meta span {
		margin-left: 0;
		margin-right: 1rem;
	}
	.single-post .free-text .wrapper.thin {
		width: calc(100% - 4rem);
	}
	.single-bottom .w75 {
		grid-template-columns: minmax(0, 1fr);
		grid-row-gap: 2rem;
	}
	.single-bottom {
		margin-bottom: 6rem;
	}

	/* Filter buttons (news, shop and experiences listings) wrap onto more lines */

	.post-filter {
		flex-wrap: wrap;
	}
	.btn.btn-filter {
		white-space: nowrap;
	}

	/* Shop */

	.featured-products {
		padding-right: 0;
	}
	.featured .product-img {
		height: 32rem;
	}

	/* Cookie notice spans the screen */

	#cookie-consent {
		left: 1rem;
	}

}

/* Short screens (a phone held sideways): a tighter open menu */
@media (max-width: 1024px) and (max-height: 500px) {

	.nav-menu {
		padding: 6rem 2rem 2rem;
	}
	.nav-menu li {
		margin: 0.5rem 0;
	}

}

/* The smallest phones (under 360px): a little more room between the logo and the header buttons */
@media (max-width: 359px) {

	#header .logo {
		width: 4.4rem;
	}
	.nav-buttons .btn {
		font-size: 0.9rem;
	}

}
