/*
Theme Name: Lamplighter Blocks
Theme URI:
Author: Abstract Marketing
Author URI:
Description: Custom theme developed for Lamplighter Inn
Requires at least: 7.0
Tested up to: 7.0
Requires PHP: 8.1
Version: 1.0.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lamplighter-blocks
Tags: full-site-editing
*/

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

iframe {
    display: block;
}

.wp-block-buttons:empty {
    display: none;
}

:where(input:not(:is([type='button'], [type='submit'])), select, textarea) {
    font: inherit;
}

:where(input:not(:is([type='button'], [type='submit'])), select, textarea) {
    background-color: #eee4;
    border: 1px solid #ddd;
    border-radius: 0;
    color: var(--wp--preset--color--contrast);
    font-family: inherit;
    font-size: var(--wp--preset--font-size--small);
    font-weight: 400;
    line-height: 1.5;
    padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
    width: 100%;
}

:where(input:focus, textarea:focus, select:focus) {
    outline: 2px solid var(--wp--preset--color--primary);
}

:where(input[type='checkbox'], input[type='image'], input[type='radio']) {
    width: auto;
}

::placeholder {
    color: var(--wp--preset--color--contrast);
    opacity: 0.5;
}

label {
   font-weight: 500 !important;
}

.entry-content {
    container-type: inline-size;
}

.entry-content :is(.alignleft, .alignright) {
    margin-block-end: 1em;
}

.entry-content :is(.alignleft, .alignright):first-child + * {
    margin-top: 0;
}

@container (width < 600px) {
    .entry-content .wp-block-image:is(.alignright, .alignleft) {
        float: none !important;
        margin: 0 0 1.5rem;
        width: 100%;
        text-align: center;
    }

    .entry-content .wp-block-image:is(.alignright, .alignleft) img {
        max-height: 400px;
        width: auto !important;
        display: inline-block !important;
    }
}

.entry-content > .page-hero:first-child {
    margin-top: -48px;
}

html,
body {
    height: 100%;
}

html:has(.admin-bar) {
    height: calc(100% - 46px);
}

@media (min-width: 782px) {
    html:has(.admin-bar) {
        height: calc(100% - 32px);
    }
}

.wp-site-blocks {
    display: grid;
    grid-template-rows: auto 1fr auto;
    grid-template-columns: 100%;
    min-height: 100%;
}

.wp-site-blocks > * {
    margin: 0 !important;
}



.site-header__inner {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.site-header.is-compact {
  .wp-block-site-logo, .wp-block-image, .wp-block-navigation__responsive-container-open {
    filter: invert(1) brightness(0);
    z-index: 100;
  }

  .site-header__inner {
    background: #faf8f2 !important;
    box-shadow: 0 2px 12px #2b2a2733;
  }
}

.home-cover {
    position: relative;
}

@media (max-width:  850px) {
  .home-cover > .wp-block-cover {
    padding-bottom: 150px;
  }

  .home-cover p {
    font-size: 16px !important;
  }
}

body.admin-bar .wp-block-cover[style*='100vh'] {
    min-height: calc(100vh - 44px) !important;

    @media (min-width: 783px) {
        min-height: calc(100vh - 32px) !important;
    }
}

.lli-book-room {
    position: absolute !important;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    width: 850px;
    max-width: 100%;

    .is-menu-open & {
        max-width: 300px;
        position: relative !important;
    }

    .is-menu-open & {
        position: relative;
        transform: unset;
        left: unset;
    }

    .lli-book-room__form {
        display: flex;
        align-items: stretch;
        gap: 0;
        background: #0005;
        color: #fff;
        backdrop-filter: blur(5px);
        border: 1px solid #fff2;
        color-scheme: dark;
    }

    .is-menu-open & .lli-book-room__form {
        flex-wrap: wrap;
    }

    .lli-book-room__field:not(.wp-block-button) {
        flex: 1 0;
        padding: 15px 20px;
    }

    .lli-book-room__field + .lli-book-room__field {
        border-left: 1px solid #fff2;
    }

    .wp-block-button {
        flex: 0;
        white-space: nowrap;
    }

    .lli-book-room__label {
        text-transform: uppercase;
        font-size: 0.75em;
        margin-bottom: 4px;
        display: block;
        letter-spacing: 0.1em;
        color: var(--wp--preset--color--primary-2);
    }

    label {
        display: block;
    }

    input,
    select {
        border: 0;
        color: #fff;
        padding: 0;
        background: transparent;
    }

    input:focus,
    select:focus {
        background: #fff;
        color: #333;
    }

    .check-in,
    .check-out {
        width: 180px;
        .is-menu-open & {
            flex: 0 0 100%;
        }
    }

    .adults,
    .children {
        width: 100px;
        .is-menu-open & {
            flex: 0 0 100%;
        }
    }
}

@media (max-width:  850px) {
  .home-cover .lli-book-room__form {
    flex-wrap: wrap;
  }

  .home-cover .check-in,
  .home-cover .check-out {
    flex-basis: 50% !important;
    border-bottom: 1px solid #fff2;
  }
}

.has-featured-image .page-header {
    min-height: 400px !important;
}

.has-featured-image .page-header .wp-block-cover__background {
    opacity: 0.5 !important;
    background-color: #000 !important;
}

.event-space.category-featured:nth-child(odd) .event-space-columns .wp-block-column:nth-child(1) {
    @media (min-width: 782px) {
        order: 1;
    }
}

.has-ken-burns img {
    animation: kenBurns 10s ease-out;
}

@keyframes kenBurns {
    from {
        transform: scale(1.2);
    }

    to {
        transform: scale(1);
    }
}

.wp-block-navigation__responsive-container-open::before {
    content: 'Menu';
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 33px;
}

.image-pair {
    aspect-ratio: 4/3;
    container-type: inline-size;
    position: relative;

    & .wp-block-image {
        width: 66% !important;

        & img {
            aspect-ratio: 4/3;
            object-fit: cover;
            width: 100%;
        }

        &:nth-of-type(2) {
            position: absolute;
            bottom: 0;
            right: 0;
            border-width: 4cqi !important;
            border-color: currentColor;
            border-style: solid none none solid;
        }
    }
}

.wp-block-accordion-item {
    margin: 0;
    padding-block: 8px;

    &:not(:first-child) {
        border-top: 1px solid #ddd;
    }

    .wp-block-accordion-panel {
        margin: 0;
        padding-bottom: 12px;
    }
}

.wp-block-navigation__responsive-close {
    max-width: 500px !important;
    margin-right: 0 !important;
}

.wp-block-navigation-overlay-close::before {
    position: fixed;
    content: '';
    left: 0;
    background-color: #0006;
    top: 0;
    bottom: 0;
    height: 100%;
    width: calc(100% - 500px);
}

@media not (prefers-reduced-motion) {
    .wp-block-navigation__responsive-container.is-menu-open {
        animation: overlay-menu__slide-in-animation 0.2s ease-out;
        animation-fill-mode: forwards;
    }
}

@keyframes overlay-menu__slide-in-animation {
    0% {
        opacity: 0;
        transform: translateX(2em);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.room-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 8px;

    a {
        display: block;
    }

    img {
        width: 100%;
        display: block;
        aspect-ratio: 1/1;
        object-fit: cover;
    }
}

@media (max-width: 600px) {
  .wp-block-media-text__content > .wp-block-group {
    padding-top: 8%;
  }
}

.wp-block-button.is-style-outline {
  position: relative;

  .wp-block-button__link {
    transition: all .33s ease;
  }

  .wp-block-button__link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: var(--wp--preset--color--primary);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: 0;
    transition: all .33s ease;
  }

  &:hover {
    .wp-block-button__link {
      background: transparent;
      color: #fff;
      box-shadow: inset 0 0 0 1px var(--wp--preset--color--primary)
    }

    .wp-block-button__link::before {
      transform: scale(1)
    }
  }
}

.wp-block-media-text {
  .wp-block-media-text__media {
    overflow: hidden;

    img {
      transition: transform .5s ease;
      will-change: transform;

      &:hover {
        transform: scale(1.05);
        transition: transform 1s ease;
      }
    }
  }
}

.wp-block-navigation .lli-book-room {
  form {
    background: #fff !important;
    color-scheme: light;
  }

  input, select {
    color: #222;
  }

  .wp-block-button {
    flex: 1;
  }

  button {
    width: 100%;
  }
}
