/* Generic
-------------------------------------------------- */
@font-face {
	font-family: 'Open Sans';
	src: url('../res/fonts/OpenSans-VariableFont_wdth,wght.ttf');
}

:root {
	--shadow: 2px 2px 5px rgba(0,0,0,.4);
	--shadow-deep: 3px 3px 6px rgba(0,0,0,.6);
	--top-shadow: 0 -1px 6px rgba(0,0,0,.2);
	--shadow-tr: 2px -2px 5px rgba(0,0,0,.4);
	--click-animation: translateY(1px) translateX(-1px) scale(0.95);

	--bg-color: #f1f1f1;
	--bg-dark: #111;
	--hyperlink-blue: #0d6efd;


	--brand-dark: #1a1423;
	--brand-light: #774c60;
	--theme-dark: #372549;
	--theme-light: #b75d69;
	--soft-light: #eacdc2;

	--brand-dark-rgb: 26,20,35;
	--brand-light-rgb: 119,76,96;
	--theme-dark-rgb: 55,37,73;
	--theme-light-rgb: 183,93,105;
	--soft-light-rgb: 234,205,194;

	--bs-bg-opacity: 1;

	--z-fixed-elt: 1000;
	--z-popover: 1001;
	--z-modal: 1002;
}


/* Reset
-------------------------------------------------- */
html {
	font-size: 20px;
}

body {
	margin: 0;
	padding: 0;
	font-size: 1rem;
	box-sizing: border-box;
	line-height: 1.25;
	font-family: 'Open Sans', Arial, sans-serif;
	background-color: var(--bg-color);
}

*, *::before, *::after {
	box-sizing: inherit;
	/* outline: 1px dotted red; */
}

input, button, select, textarea {
	font: inherit;
}


/* Typography
-------------------------------------------------- */
p, h1, h2, h3, h4, h5, h6 {
	margin: 0;
	font-weight: 400;
}

h1, .h1 {
	font-size: 1.45rem;
	font-size: clamp(1.45rem, 3vw, 1.75rem);
}

h2, .h2 {
	font-size: 2rem;
}

h3, .h3 {
	font-size: 1.3rem;
	font-size: clamp(1.3rem, 2.6vw, 1.5rem);
}

h4, .h4 {
	font-size: 1.15rem;
	font-size: clamp(1.15rem, 2.4vw, 1.25rem);
}

h5, .h5 {
	font-size: 1.5rem;
	font-size: clamp(1.5rem, 2.8vw, 2rem);
}

a {
	color: var(--hyperlink-blue);
	text-decoration: none;
}
a:active, a:hover {
	text-decoration: underline;
}

.text-nowrap { white-space: nowrap !important }
.text-left { text-align: left !important }
.text-right { text-align: right !important }
.text-center { text-align: center !important }

.m1 { margin: .5rem !important }
.m2 { margin: 1rem !important }
.m3 { margin: 1.5rem !important }

.my1 {
	margin-top: .5rem !important;
	margin-bottom: .5rem !important;
}
.my2 {
	margin-top: 1rem !important;
	margin-bottom: 1rem !important;
}
.my3 {
	margin-top: 1.5rem !important;
	margin-bottom: 1.5rem !important;
}

.mt1 { margin-top: .5rem !important }
.mt2 { margin-top: 1rem !important }
.mt3 { margin-top: 1.5rem !important }

.mb1 { margin-bottom: .5rem !important }
.mb2 { margin-bottom: 1rem !important }
.mb3 { margin-bottom: 1.5rem !important }

.mx1 {
	margin-left: .5rem !important;
	margin-right: .5rem !important;
}
.mx2 {
	margin-left: 1rem !important;
	margin-right: 1rem !important;
}
.mx3 {
	margin-left: 1.5rem !important;
	margin-right: 1.5rem !important;
}

.ml1 { margin-left: .5rem !important }
.ml2 { margin-left: 1rem !important }
.ml3 { margin-left: 1.5rem !important }

.mr1 { margin-right: .5rem !important }
.mr2 { margin-right: 1rem !important }
.mr3 { margin-right: 1.5rem !important }


/* Layout
-------------------------------------------------- */
.container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: .75rem .85rem;
	padding: clamp(.75rem, 2vw, 1rem) clamp(.85rem, 2.5vw, 1.25rem);
}

.row {
	--gutter-x: 0.5rem;
	--gutter-x: clamp(0.5rem, 2vw, 1rem);
	--gutter-y: 0.5rem;
	--gutter-y: clamp(0.5rem, 2vw, 1rem);
	
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin-top: calc(-1 * var(--gutter-y));
	margin-right: calc(-.5 * var(--gutter-x));
	margin-left: calc(-.5 * var(--gutter-x));
}
.row > * {
	max-width: 100%;
	padding-right: calc(var(--gutter-x) * .5);
	padding-left: calc(var(--gutter-x) * .5);
	margin-top: calc(var(--gutter-y) * .5);
	margin-bottom: calc(var(--gutter-y) * .5);
}
.col-1 {
	flex: 0 0 auto;
	width: 8.3333%;
}
.col-2 {
	flex: 0 0 auto;
	width: 16.6667%;
}
.col-3 {
	flex: 0 0 auto;
	width: 25%;
}
.col-4 {
	flex: 0 0 auto;
	width: 33.3333%;
}
.col-5 {
	flex: 0 0 auto;
	width: 41.6667%;
}
.col-6 {
	flex: 0 0 auto;
	width: 50%;
}
.col-7 {
	flex: 0 0 auto;
	width: 33.3333%;
}
.col-8 {
	flex: 0 0 auto;
	width: 66.6667%;
}
.col-9 {
	flex: 0 0 auto;
	width: 75%;
}
.col-10 {
	flex: 0 0 auto;
	width: 83.3333%;
}
.col-11 {
	flex: 0 0 auto;
	width: 91.6667%;
}
.col-12 {
	flex: 0 0 auto;
	width: 100%;
}

.d-block {
	display: block !important;
}
.d-none {
	display: none !important;
}


/* Tables
-------------------------------------------------- */
table {
	border-collapse: collapse;
}
thead, tbody, tr, th, td {
	border-color: inherit;
	border-style: solid;
	border-width: 0;
}

.table {
	width: 100%;
	vertical-align: top;
	border-color: #dee2e6;
}
.table > thead {
	vertical-align: bottom;
}
.table th, .table td {
	text-align: left;
	padding: .5rem .5rem;
}
.table thead, .table tbody tr:not(:last-of-type) {
	border-bottom-width: 1px;
}

/* Hidden by default; revealed on touch devices in landscape */
.landscape-col {
	display: none;
}
@media (orientation: landscape) and (hover: none) and (pointer: coarse) {
	.landscape-col {
		display: table-cell;
	}
}


/* Buttons
-------------------------------------------------- */
.btn {
	display: inline-block;
	padding: 0.5rem 0.5rem;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.85rem;
	font-size: clamp(0.85rem, 3vw, 1.05rem);
	background-color: var(--bg-color);
}

.btn-theme {
	background-color: rgba(var(--theme-light-rgb), var(--bs-bg-opacity));
	color: var(--bg-color);
}

.w-100 {
	width: 100%;
}


/* Brand Colors
-------------------------------------------------- */
.bg-brand-dark {
	background-color: rgba(var(--brand-dark-rgb), var(--bs-bg-opacity)) !important;
	color: rgb(var(--brand-light-rgb)) !important;
}
.bg-brand-light {
	background-color: rgba(var(--brand-light-rgb), var(--bs-bg-opacity)) !important;
	/* color: rgb(var(--brand-dark-rgb)) !important; */
	color: var(--bg-color);
}
.bg-theme-dark {
	background-color: rgba(var(--theme-dark-rgb), var(--bs-bg-opacity)) !important;
	color: rgb(var(--theme-light-rgb)) !important;
}
.bg-theme-light {
	background-color: rgba(var(--theme-light-rgb), var(--bs-bg-opacity)) !important;
}


/* SPA Layout
-------------------------------------------------- */
body {
	width: 100vw;
	height: 100vh;
	height: 100svh;
	height: 100dvh;
	display: flex;
	flex-direction: column;
}

header {
	flex: 0 0 auto;
}

main {
	flex: 1;
	overflow: hidden;
	position: relative;
}

.scroll-container {
	height: 100%;
	overflow-y: auto;
	/* account for the footer height */
	padding-bottom: 3.5rem;
}

section {
	position: relative;
	border-bottom: 1px solid #aaa;
	padding: .65rem 0;
	margin: .65rem 0;
}
section:first-of-type {
	padding-top: 0;
}

footer {
	position: absolute;
	bottom: -.5rem;
	left: 0;
	right: 0;
	z-index: var(--z-fixed-elt);
}

.header-flex {
	display: flex;
	flex-direction: row;
	align-items: center;	
}

.header-logo {
	--size-sm: 40px;
	--size-lg: 50px;

	width: var(--size-sm);
	height: var(--size-sm);
	width: clamp(var(--size-sm), 4vw, var(--size-lg));
	height: clamp(var(--size-sm), 4vw, var(--size-lg));
	margin-right: 0.25rem;
}

.golf-logo {
	--size-sm: 32px;
	--size-lg: 40px;

	width: var(--size-sm);
	height: var(--size-sm);
	width: clamp(var(--size-sm), 3.5vw, var(--size-lg));
	height: clamp(var(--size-sm), 3.5vw, var(--size-lg));
	margin-right: 0.25rem;
}

.header-title {

}

.header-info {
	margin-left: auto;
	font-weight: 700;
}

.footer button {
	filter: drop-shadow(3px -3px 7px #fff);
	box-shadow: var(--shadow-tr);
	height: 52px;
}

.footer button:active {
	box-shadow: var(--shadow-deep);
	transform: var(--click-animation);
	transition: transform 0.1s, box-shadow 0.1s;
}


/* Modal
-------------------------------------------------- */
.modal {
	position: fixed;
	top: 0; bottom: 0;
	left: 0; right: 0;
	z-index: var(--z-modal);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.modal-bg {
	position: absolute;
	width: 100%;
	height: 100%;
}
.modal-fuzz {
	backdrop-filter: blur(0px);
	transition: backdrop-filter .15s linear;
}
.modal.show .modal-fuzz {
	backdrop-filter: blur(2px);
}
.modal-fade {
	background-color: rgb(0, 0, 0);
	opacity: 0%;
	transition: opacity .15s linear;
}
.modal.show .modal-fade {
	opacity: 40%;
}

.modal-box {
	position: relative;
	background-color: var(--bg-color);
	border-radius: 4px;
	box-shadow: var(--shadow-deep);
	width: 90%;
	max-width: 800px;
	max-height: 90svh;
	display: flex;
	flex-direction: column;
	transform: translateY(50vh);
	transition: transform .15s ease-in;
	padding-top: 0.75rem;
}
.modal.show .modal-box {
	transform: none;
}

.modal-box > div {
	overflow-y: auto;
	flex: 1;
	min-height: 0;
	height: auto;
}

.modal-close {
	position: absolute;
	top: 0; right: .25rem;
}
.modal-close::after {
	content: '\2715';
}
.modal-close:active {
	font-weight: bold;
}


/* Popover
-------------------------------------------------- */
.popover {
	position: fixed;
	z-index: var(--z-popover);
	background-color: #fff;
	border: 1px solid rgba(0,0,0,.2);
	border-radius: 4px;
	box-shadow: var(--shadow);
	padding: .4rem .65rem;
	font-size: .75rem;
	max-width: 220px;
	line-height: 1.4;
	opacity: 0;
	pointer-events: none;
	transition: opacity .15s linear;
}
.popover.popover-visible {
	opacity: 1;
	pointer-events: auto;
}

.popover-lg {
	max-width: 300px;
}

/* Arrow — ::before is the border, ::after is the white fill */
.popover::before,
.popover::after {
	content: '';
	position: absolute;
	border: 7px solid transparent;
}
.popover::after {
	border-width: 6px;
}

/* top: popover above trigger, arrow at bottom pointing down */
.popover-top::before {
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border-top-color: rgba(0,0,0,.2);
}
.popover-top::after {
	top: calc(100% - 1px);
	left: 50%;
	transform: translateX(-50%);
	border-top-color: #fff;
}

/* bottom: popover below trigger, arrow at top pointing up */
.popover-bottom::before {
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	border-bottom-color: rgba(0,0,0,.2);
}
.popover-bottom::after {
	bottom: calc(100% - 1px);
	left: 50%;
	transform: translateX(-50%);
	border-bottom-color: #fff;
}

/* left: popover left of trigger, arrow at right pointing right */
.popover-left::before {
	left: 100%;
	top: 50%;
	transform: translateY(-50%);
	border-left-color: rgba(0,0,0,.2);
}
.popover-left::after {
	left: calc(100% - 1px);
	top: 50%;
	transform: translateY(-50%);
	border-left-color: #fff;
}

/* bottom-left: popover below trigger, right-aligned to trigger, arrow at top-right pointing up */
.popover-bottom-left::before {
	bottom: 100%;
	right: 1rem;
	border-bottom-color: rgba(0,0,0,.2);
}
.popover-bottom-left::after {
	bottom: calc(100% - 1px);
	right: 1rem;
	border-bottom-color: #fff;
}

/* right: popover right of trigger, arrow at left pointing left */
.popover-right::before {
	right: 100%;
	top: 50%;
	transform: translateY(-50%);
	border-right-color: rgba(0,0,0,.2);
}
.popover-right::after {
	right: calc(100% - 1px);
	top: 50%;
	transform: translateY(-50%);
	border-right-color: #fff;
}


/* Super specific stuff
-------------------------------------------------- */
.current_hole {
	font-weight: bold;
}

@keyframes time-pulse {
	0%, 100% { transform: scaleX(0.1); opacity: 0.4; }
	50%       { transform: scaleX(1);   opacity: 1;   }
}

.current-time-slot::after {
	content: '';
	display: block;
	height: 2px;
	background-color: var(--theme-light);
	border-radius: 1px;
	margin-top: 3px;
	margin-left: 1.5rem;
	animation: time-pulse 1.8s ease-in-out infinite;
	transform-origin: right center;
}

.gmaps_svg {
	width: 48px;
	height: auto;
}


.drink-callout {
	position: absolute;
	top: -.35rem;
	left: -.35rem;
	font-size: .6rem;
	opacity: .65;
}

.notes {
	margin-top: .25rem;
	font-weight: 200;
}
.par {
	display: inline-block;
	background-color: var(--bg-dark);
	color: #fff;
	padding: .5rem;
	border-radius: 6px;
}

.side-label {
	text-transform: uppercase;
	font-size: 80%;
	opacity: .9;
	margin-bottom: .5rem;
}

.bg-splash {
	background-image: url('../res/kyle_young.jpg');
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
}

.modal-box.splash {
	backdrop-filter: blur(10px) opacity(0%);
	background-color: rgba(255,255,255,.7);
	padding-top: 0;
}