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

*,
*::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: #f3f3ee;
    border: 2px solid #d5d2b5;
    border-radius: 5px;
    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-item, .wp-block-navigation__responsive-container-open {
    filter: invert(1) brightness(0);
    z-index: 100;
  }

  .site-header__inner {
    background: #faf8f2f7 !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;
  }
}

.home-cover :is(h1, p) {
  text-shadow:
    1px 1px 3px #0002,
    1px 1px 12px #0004,
    1px 1px 24px #0009
}

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;
		border-radius: 4px;
		overflow: hidden;
        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: 550px !important;
}

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

.page-id-31.has-featured-image .page-header .wp-block-cover__background {
    opacity: 0.15 !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;
    }
}

.has-modal-open .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 {
  position: relative;

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

  .wp-block-button__link::before {
    content: '';
    position: absolute;
    top: 0;
	  border-radius: 5px;
    left: 0;
    height: 100%;
    width: 100%;
    background: var(--wp--preset--color--primary);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: 0;
    transition: transform .33s ease, color .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-navigation .lli-book-room {
  form {
    background: #fff !important;
    color-scheme: light;
  }

  input, select {
    color: #222;
  }

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

  button {
    width: 100%;
  }
}

.home-features {

}

.splide__arrow {
  height: 10em;
  width: 4em;
  border-radius: 0 !important;
  background: #000c;

	svg {
		width: 1.5rem;
		height: 1.5rem;
		fill: #fff;
	}
}

.room-style-header {
  position: relative;
  
  figure {
    margin: 0;
  }
  
  .wp-block-post-title {
    position: absolute;
    bottom: 10px;
    left: 10px;
  }
  
  &::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 4rem;
    transition:
      background-image .2s ease,
      background-color .2s ease;
  }
  
  &:hover::after {
    background-color: #0005;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' fill='%23fff' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 2H7.979C6.88 2 6 2.88 6 3.98V12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 10H8V4h8zM4 10H2v6c0 1.1.9 2 2 2h6v-2H4z'/%3E%3C/svg%3E");
  }
}

input.datepicker {
  width: 100% !important;
}

.lli-book-room button {
  background: var(--wp--preset--color--primary);
  color: #fff;
  box-shadow: none;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.wp-block-cover__image-background {
  object-fit: cover;
  object-position: var(--featured-image-x, 50%) var(--featured-image-y, 50%);
}

.home-features {
  padding-block: 16px;
  flex-wrap: wrap;
  font-size: .7rem;
  gap: 0;
  
  @media (min-width: 600px) {
    font-size: .9rem;
  }
  
  @media (min-width: 850px) {
    flex-wrap: nowrap;
  }

  & > div {
    flex: 0 0 calc(100% / 5);
    padding-inline: 4px;
      
    @media (min-width: 850px) {
      flex: 0 0 calc(100% / 7);
    }
  }
  
  & svg {
    max-width: 40px;
    
    @media (min-width: 600px) {
      max-width: 50px;
    }
  }
}

@media (max-width: 850px) {
  .home-features-2 > .wp-block-group {
    padding-block: 16px !important;
  }
}

.home-icons .sm-svg-width {
  --svg--width: unset;
}

@media (max-width: 1159px) {
  .site-header .wp-block-site-logo {
    flex-grow: 1;
  }
  
  .site-header .wp-block-navigation {
    order: 1;
  }
}

#tripleseat_embed_form {
    margin: 0;
    
    h1, h2, h3 {
        margin: 0 0 .25em;
        line-height: 1.1;
    }
    
    h1 {
        font-size: var(--wp--preset--font-size--xx-large);
        margin-top: 0;
        position: relative;
        
        &::after {
            content: '';
            display: block;
            width: 100px;
            bottom: 0;
            margin-top: 16px;
            left: 0;
            height: 3px;
            background: var(--wp--preset--color--primary);
        }
    }
    
    input, select, textarea, .tripleseat-dlf-checkbox-label {
        font-size: 15px;
    }
    
    .tripleseat-dlf-text  {
        margin-top: 0;
    }
    
    .tripleseat-dlf-checkbox-item {
        display: flex;
        align-items: baseline;
        gap: 4px;
    }
    
    .tripleseat-dlf-submit {
        position: relative;
        cursor: pointer;
        text-transform: uppercase;
        padding: .7em 1.6em;
        border: 0;
        border-radius: 5px;
        background: transparent;
        color: var(--wp--preset--color--primary);
        box-shadow: inset 0 0 0 1px currentColor;
        font: inherit;
        font-size: var(--wp--preset--font-size--x-small);
        font-weight: 500;
    }
}

#tripleseat_link {
font-size: 14px !important;
}

#tripleseat_embed_form .tripleseat-dlf-label {
    display: none;
}

#tripleseat_embed_form input:not(:is(input[type="radio"], input[type="checkbox"])),
#tripleseat_embed_form button,
#tripleseat_embed_form textarea {
  background-color: #f3f3ee !important;
  border: 2px solid #d5d2b5 !important;
  border-radius: 5px !important;
  color: var(--wp--preset--color--contrast);
  font-family: inherit;
  font-weight: 400;
  line-height: 1.5;
  padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
  width: 100%;
}