:root {
    --accent-color: #A1D99B;
    --container-bg-color: #FAF7F0;
}
* {
    box-sizing: border-box;
}
html {
    font-size: 16px;
    font-weight: 200;
}
body {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    max-width: 100vw;
    width: 100vw;
    height: 100vh;
    font-size: 1rem;
    font-family: "Afacad Flux", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-variation-settings: "slnt" 0;
    background-color: var(--container-bg-color);
}
h1, h2, h3 {
    font-family: "Afacad Flux", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-variation-settings: "slnt" 0;
    margin: 0;
}
h1 {
    font-weight: 600;
    font-size: 2rem;
}
h2 {
    font-weight: 400;
    font-size: 1.8rem;
}
h3 {
    font-weight: 300;
    font-size: 1.5rem;
}
button {
    font-family: "Afacad Flux", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-variation-settings: "slnt" 0;
}
.app-content {
    width: 100%;
    flex-grow: 1;
    overflow-y: auto;
    position: relative;
    scroll-snap-type: x mandatory;
}

/*
 * App Bar styles
 */

.app-bar {
    width: 100%;
    height: 52px;
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: var(--accent-color);
    padding: 8px;
    position: sticky;
}
.app-bar > .app-icon {
    margin-right: 8px;
}
.spacer {
    flex-grow: 1;
}

/*
 * Button styles
 */

button {
    padding: 4px;
    font-size: 20px;
}
button.icon {
    border-width: 0;
    background-color: rgba(0, 0, 0, 0);
    fill: black;
}
button.icon:hover {
    fill: grey;
}
svg.icon {
    width: 2rem;
    height: 2rem;
}

/*
 * Availability matrix grid styles
 */
 table {
    --column-width: 44px;
    table-layout: fixed;
    width: min(calc(var(--column-width) * 9), 100%);
    border-collapse: collapse;
    border-width: 0;
}
table td {
    vertical-align: top;
}
table th {
    font-weight: 200;
}
table td.available {
    background-color: var(--accent-color);
    aspect-ratio: 1;
    scroll-snap-align: center;
    height: var(--column-width);
    border: 1px solid var(--container-bg-color);
    vertical-align: middle;
}
table td.not-available {
    background-color: #dadada;
    aspect-ratio: 1;
    scroll-snap-align: center;
    height: var(--column-width);
    border: 1px solid var(--container-bg-color);
}
table > colgroup > col {
    width: var(--column-width);
}
table > colgroup > col:first-child {
    width: calc(var(--column-width) * 2);
}
table th.campground-header {
    text-align: start;
    font-weight: bold;
}
table th.campsite-header {
    text-align: end;
    padding-inline-end: 8px;
}
table > thead th:first-child {
    position: sticky;
    top: 0;
    left: 0;
    background-color: var(--container-bg-color);
    z-index: 3;
}
table > tbody th {
    position: sticky;
    left: 0;
    background-color: var(--container-bg-color);
    z-index: 2;
}
table > thead > tr.date-row > th:not(:first-child) {
    position: sticky;
    top: 0;
    z-index: 1;
}
table .van-capacity {
    --fract-van-capacity: 1.0;
    margin-right: 4px;
    clip-path: inset(0 0 0 calc((1.0 - var(--fract-van-capacity)) * 100%));
    cursor: default;
}
.month {
    padding-left: 4px;
    padding-right: 4px;
    overflow: clip;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-align: start;
}
.month > span {
    position: sticky;
    left: calc(calc(var(--column-width) * 2) + 4px);
}
.month-01 {
    background-color: #EEF5FF;
    color: black;
}
.month-02 {
    background-color: #9EB8D9;
    color: black;
}
.month-03 {
    background-color: #B1D690;
    color: black;
}
.month-04 {
    background-color: #E7CCCC;
    color: black;
}
.month-05 {
    background-color: #A3D8FF;
    color: black;
}
.month-06 {
    background-color: #FFB996;
    color: black;
}
.month-07 {
    background-color: #ECEE81;
    color: black;
}
.month-08 {
    background-color: #F7C566;
    color: black;
}
.month-09 {
    background-color: #AB886D;
    color: black;
}
.month-10 {
    background-color: #ECB159;
    color: black;
}
.month-11 {
    background-color: #186F65;
    color: white;
}
.month-12 {
    background-color: #001F3F;
    color: white;
}
.weekday-6, .weekday-7 {
    font-weight: bold;
}
.forecast {
    --precipitation: 0%;
    --rain-color: rgb(157, 181, 255);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    text-decoration: none;
    background: linear-gradient(0deg, var(--rain-color) 0%, var(--rain-color) var(--precipitation), rgba(0, 0, 0, 0) var(--precipitation), rgba(0, 0, 0, 0) 100%);
}
.high {
    color: red;
}
.low {
    color: blue;
}
a.sync-time {
    display: flex;
    font-size: 0.8rem;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: black;
}
a.sync-time:visited {
    color: black;
}

/*
 * Bottom drawer sheet styles
 */

.modal {
    display: flex;
    position: fixed;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    z-index: 99;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.4);
    visibility: hidden;
    transition: visibility 0.1s;
}
.modal.open {
    visibility: visible;
}
.modal-dialog {
    background-color: var(--container-bg-color);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    min-height: 60%;
    max-height: 90%;
    overflow-y: auto;
    padding: 8px;
    transform: translateY(100%);
    transition: transform 0.1s ease-out;
    font-size: 1.5rem;
    overscroll-behavior: contain;
}
.modal.open > .modal-dialog {
    transform: translateY(0%);
}
#modal-body {
    padding: 8px;
}
.modal button {
    background-color: white;
    border: 0;
    border-radius: 4px;
    color: black;
    cursor: pointer;
    line-height: 2.5;
    outline: 1px solid black;
    padding: 0 1rem;
    text-align: center;
    text-decoration: none;
    user-select: none;
}
.modal button[disabled] {
    cursor: default;
    outline: 1px solid lightgray;
    color: lightgray;
}
.modal button.destructive:not([disabled]) {
    outline-color: red;
    color: red;
}
.modal button.hero:not([disabled]) {
    outline-color: #2C8434;
    color: #2C8434
}
.modal button:not([disabled]):focus {
    outline-width: 2px;
}
.modal button:not([disabled]):hover {
    background-color: lightgray;
}
.modal button.destructive:not([disabled]):hover {
    background-color: #FFBEBA;
}
.modal button.hero:not([disabled]):hover {
    background-color: #BCFFC2;
}


/**
  * Toast styles.
  */

.toast-container {
    height: 1.6rem;
    width: 100vw;
    background-color: rgb(27, 27, 27);
    color: white;
    transform: translateY(100%);
    position: fixed;
    bottom: 0px;
    transition: transform 0.5s ease-out;
}

.toast-container:not(:empty) {
    transform: translateY(0%);
}

.toast-container > * {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    padding: 0px 4px;
}