/* ========================= vars ========================= */
:root {
    --bg-opacity: #0003;
    --text: #fff;
    --flash-base-color: #68F0;
    --flash-blink-color: #68F;
}

/* ========================= background ========================= */
body:not(:has(div.safari-bg)) {
    background-image: url("/data/background.png");
    background-attachment: fixed;
    background-repeat: repeat;
    background-size: contain;
    background-color: #54607b;
}

.safari-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 125vw;
    height: 125svh;
    z-index: -1;
    pointer-events: none;
}

.safari-bg img {
    width: 125vw;
    height: 125svh;
    object-fit: cover;
    object-position: left center;
    pointer-events: none;
    display: block;
}

.main-window {
    display: grid;
    grid-template-columns: 1fr 55vw 1fr;
    column-gap: 1em;
    width: 100vw;
    padding: 1em;
    box-sizing: border-box;
    color: var(--text);
}

h1 {
    font-size: 3em;
    text-align: center;
    margin: 0;
}

h2 {
    font-size: 2em
}


/* ========================= example gallery stuff ========================= */
.left-gallery {
    grid-column: 1;
    grid-row: 1;
}

.left-gallery h2 {
    text-align: center;
}

.gallery-entry {
    border-top: 2px solid #ccc;
    margin-bottom: 1em;
    padding: .5em;
    background-color: #0002;
}

.gallery-entry h3 {
    text-align: center;
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: .5em;
}

.gallery-media {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1em;
}

.gallery-image {
    width: calc(50% - .5em);
    text-align: center;
}

.gallery-image img {
    max-width: 100%;
}

/* ========================= center info stuff =========================  */
.center-article {
    background-color: var(--bg-opacity);
    padding: 1em;
    height: fit-content;
}

.contact-links {
    margin: 1em auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2em;
    max-width: 75%;
}

.contact-links a {
    padding: 1em;
    background-color: #7B5C54;
    border-radius: 1em;
    word-break: break-all;
    color: var(--text);
    text-align: center;
    text-decoration-line: none;
}

.price-sheet {
    width: 100%;
    display: flex;
    justify-content: center;
    img {
        box-sizing: border-box;
        padding: 1em;
        max-width: 100%;
        max-height: 60vh;
    }
}

.comm-status {
    text-align: center;
    .status-open {
        color: limegreen;
    }
    .status-closed {
        color: salmon;
    }
}


/* ========================= right review stuff =========================  */

.right-reviews h2 {
    text-align: center;
}

.reviews-note small {
    display: block;
}

@keyframes flash {
    0% {background-color: var(--flash-base-color);}
    25% {background-color: var(--flash-blink-color);}
    50% {background-color: var(--flash-base-color);}
    75% {background-color: var(--flash-blink-color);}
    100% {background-color: var(--flash-base-color);}
}
.review-flash {
    animation: flash 2s linear 1;
}

.flash-success { 
    color: #aea;
}

.flash-error { 
    color: #fc8;
}

.review-form label { 
    display: flex;
    flex-direction: column;
}

.review-form input, .review-form textarea { 
    padding: .5em;
    border: 1px solid #ccc; 
    border-radius: 4px; 
}

.review-form button { 
    padding: .5em 1em; 
    cursor: pointer; 
    margin-top: .5em;
}

.reviews-list {
    color: light-dark(black, white);
}

.review-item {
    padding: .6em;
    margin-top: 1em;
    border: 0.3em solid #aaa;
    border-radius: 6px;
    background: light-dark(#eee, #444);
}

.review-item time {
    float: right;
}

.review-body {
    margin-top: .4em;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-wrap: break-word; 
    word-break: normal;
    hyphens: auto;
}

.review-sub-item {
    padding: .6em 0;
    display: flex;
    flex-direction: column;
    gap: .4em;
}

.review-sub-header {
    display: flex;
    gap: .6em;
    align-items: baseline;
    justify-content: space-between;
    font-size: .95em;
}

.review-separator {
    height: 1px;
    background: light-dark(#0003, #fff3);
    margin: .6em 0;
}

/* ========================= responsiveness =========================  */

@media (max-width: 1199px) {
    .main-window {
        display: flex;
        flex-direction: column;
    }

    .image-gallery {
        padding: 1em;
        background-color: var(--bg-opacity);
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1em;
    }

    .example-img {
        width: 45%;
    }

    .contact-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .right-reviews {
        padding: 1em;
        background-color: var(--bg-opacity);
    }
}

body.force-dark {
    .gallery-image, ul {
        text-shadow: 2px 2px 1px black;
    }
    .review-separator {
        background: #fff3;
    }
}