/* [3] RSVP page specific styles */

body {
    background-color: white;
    color: #222;
    opacity: 1;
    /* invisible at first for Landing page only - fades in*/
}

body.loaded {
    opacity: 1;
    transition: opacity 0s ease 0s;

}

.grid {
    scroll-snap-type: y mandatory;
    /*  will-change: transform; */
    /* required for scroll snappping */
    overflow-y: scroll;
    /* required for scroll snapping on mobile */
    display: grid;
    width: 100%;
    grid-template-columns: 100%;

    /* overriden bellow when dvh is available */
    background-color: #fff;
    /* each row = full screen fallback */
    scroll-behavior: smooth;
    /* let's floating buttons scroll smoothly to correct section */
}

.grid>* {
    width: 100%;
    /* Make sure children stretch to fill the grid's column width */
}

/* on desktop only, change grid setup */
@media (min-width: 768px) {
    .grid {
        /* use for 2 columns */
        grid-template-columns: calc(50% + (100vw - 100%) / 2) calc(50% - (100vw - 100%) / 2);
        /* or use for 1 column */
        grid-template-columns: 1fr;
        overflow-x: hidden;
    }
}

/* Use javascript to set section heights, replace any with auto to make them auto sized */
.grid {
    grid-template-rows: calc(var(--vh, 1vh) * 100) calc(var(--vh, 1vh) * 100) calc(var(--vh, 1vh) * 100) calc(var(--vh, 1vh) * 100) calc(var(--vh, 1vh) * 100) calc(var(--vh, 1vh) * 100) calc(var(--vh, 1vh) * 100) calc(var(--vh, 1vh) * 100) calc(var(--vh, 1vh) * 100) calc(var(--vh, 1vh) * 100) calc(var(--vh, 1vh) * 100) calc(var(--vh, 1vh) * 100) calc(var(--vh, 1vh) * 100) calc(var(--vh, 1vh) * 100) calc(var(--vh, 1vh) * 100);
}


/* Grid sections */
section {
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    /* will-change: transform; */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: hidden;

}

.sectionContent {
    height: 70vh;
    max-width: 600px;
    width: 90vw;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4vh;
}

.sectionContentBox {
    max-width: 400px;
    font-size: calc(min(400px, 89vw) / 25);
    display: flexbox;
}


.sectionContent p {
    font-size: 4em !important;
    margin: 0;
}

p.sectionHeader {
    font-size: 3em !important;
    margin: 0;
    font-family: 'i-eat-crayons', sans-serif !important;

}

.s-imgRight {
    width: 300px;
    max-width: 90vw;
    border: 1px solid purple;
    position: relative;
    right: 0px;
    left: 0px;
    float: right;
    margin-bottom: -50px;
}

.sectionContent img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    /* this centres the image */
}

.autoHeight {
    overflow-x: clip;
}


.sectionImgBottom,
.sectionImgTop {
    height: 50%;
    width: 100%;
    position: relative;
    top: 0;
    left: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    font-family: 'i-eat-crayons', sans-serif !important;
    font-size: 3em;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sectionImgBottom.black{
    color:#fff !important;
}

/* Desktop-only layout */
@media (min-width: 108px) {

    .sectionImgBottom,
    .sectionImgTop {
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
    }

    .sectionImgBottom {
        background-color: transparent !important;
        color: #fff !important;
    }

}


#sectionHome1 {
    background-color: #fff;
}



@media (max-width: 767px) {
    #section2imgTop {
        background-image: url('/img/stock/wanaka1_portrait.jpg');
    }
}

@media (min-width: 768px) {
    #section2imgTop {
        background-image: url('/img/stock/wanaka1.jpg');
    }
}

@media (max-width: 767px) {
    #section3imgTop {
        background-image: url('/img/stock/wanaka2_portrait.jpg');
    }
}

@media (min-width: 768px) {
    #section3imgTop {
        background-image: url('/img/stock/wanaka2.jpg');
    }
}


@media (max-width: 767px) {
    #section4imgTop {
        background-image: url('/img/stock/wanaka3_portrait.jpg');
    }
}

@media (min-width: 768px) {
    #section4imgTop {
        background-image: url('/img/stock/wanaka3.jpg');
    }
}


@media (max-width: 767px) {
    #section5imgTop {
        background-image: url('/img/stock/wanaka4_portrait.jpg');
    }
}

@media (min-width: 768px) {
    #section5imgTop {
        background-image: url('/img/stock/wanaka4.jpg');
    }
}



@media (max-width: 767px) {
    #section6imgTop {
        background-image: url('/img/stock/wanaka5_portrait.jpg');
    }
}

@media (min-width: 768px) {
    #section6imgTop {
        background-image: url('/img/stock/wanaka5.jpg');
    }
}



@media (max-width: 767px) {
    #section7imgTop {
        background-image: url('/img/stock/wanaka6_portrait.jpg');
    }
}

@media (min-width: 768px) {
    #section7imgTop {
        background-image: url('/img/stock/wanaka6.jpg');
    }
}






#sectionHome2 {
    background-color: #fff;
}

#sectionHome3,
#sectionHome3b,
#sectionHome3c {
    background-color: #fff;
}


#sectionHome4 {
    background-color: #fff;
}

#sectionHome5 {
    background-color: #fff;
}

#sectionHome6 {
    background-color: #fff;
}

#sectionHome7 {
    background-color: #fff;
}


.homepageHeader {
    font-family: 'i-eat-crayons', sans-serif !important;
    margin-top:3vh;
    margin-bottom:3vh;

    font-size: clamp(24px, 6.2vw, 34px);
}


#homepage-img-space {

    aspect-ratio: 100 / 91;
    /* width is 91% of height */
    width: 450px;
    max-width: 80vw;
    position: relative;
    margin-top: 0.6em;
    margin-bottom: 1em;
}

#homepage-img1 {
    position: absolute;
    left: 0;
    height: auto;
    width: 100%;
    opacity: 100%;
    z-index: 20;
}

#homepage-video1 {
    position: absolute;
    left: 0;
    height: auto;
    width: 100%;
    opacity: 100%;
    z-index: 21;
}

.recoSquare {
    width: 23%;
    margin: 0;
    height:40px;
    padding:5px;
    padding-right:3%;
    padding-left:3%;
    margin:2%;
    margin-left:0;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 1px solid #222;
    color: #222;
    vertical-align: top;
    font-size: 0.9em;
    text-decoration:none;
}

.recoSquare:active {
    background-color:#222;
    color:white;
}

@media (min-width: 768px) {
    
.recoSquare:hover {
    background-color:#222;
    color:white;
}

}


/* Itinerary items list */
#itineraryItemsContainer {
    padding-left: 0;
    padding-right: 0;
    touch-action: manipulation;
    max-height: 82dvh;
    overflow-y: hidden;
    width: 90%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
}

.itineraryItem {
    width: 100%;
    color: var(--dc-black);
    ;
    box-sizing: border-box;
    text-align: center;
    margin-top: auto;
    margin-bottom: auto;
    width: 100%;
    text-align: left;
    background-color: transparent;
    ;
    touch-action: manipulation;
    height: auto;
    z-index: 900;
    top: 0;
    position: relative;
    display: flex;
    flex-direction: row;
    gap: 0;
    overflow-x: hidden;
    overflow-y: hidden;
    margin-bottom: 3vh;
}

@media (max-width: 374px) {

    /* Styles for small phones (smaller than iPhone mini) */
    .itineraryItem {
        font-size: 0.8em;
    }
}




.itinerarySpacer {
    background-color: transparent;
    height: 2vh;
}

.itineraryItemContent {
    width: 100%;
}


.itineraryItem p {
    padding: 0;
    margin: 0;
    font-size: 1em;
    touch-action: manipulation;
}

.itineraryItem p.header {
    font-family: 'i-eat-crayons', sans-serif;
    font-size: 1.7em !important;
    line-height: 1em;
}

/* Above RSVP Form - guest names */
.rsvp-above-header {
    font-size: 1.2rem;
    margin-bottom: 4%;
    font-weight: 400;
    margin: 0px;
    margin-bottom: 1vh;
    padding: 0;
    font-size: 1.5rem;
    height: 10vh;
    color: var(--dc-rsvp);
    display: flex;
    justify-content: center;
    /* Centers image horizontally */
    align-items: center;
    /* Centers image vertically */

}

/* In Container 1. Header */
.rsvp-header {
    font-size: 1.2rem;
    margin-bottom: 4%;
    margin-top: 4vh;
}



/* Box outline drawn for RSVP Form */
.drawbox {
    width: 93vw;
    max-width: 550px;
    height: 70vh;
    border: 0;
    position: absolute;
}

/* 1 */
.drawbox.TLTR {
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    border-top: 1px solid #999;
}

.drawbox.TLTR.animate {
    animation: revealFromLeft 0.5s forwards;
}

@keyframes revealFromLeft {
    to {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

/* 2 */
.drawbox.TRBR {
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    border-right: 1px solid #999;
}

.drawbox.TRBR.animate {
    animation: revealTopToBottom 0.5s forwards;
    animation-delay: 0.5s;
    /* 1 second delay */
}

@keyframes revealTopToBottom {
    to {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

/* 3 */
.drawbox.BRBL {
    clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
    border-bottom: 1px solid #999;
}

.drawbox.BRBL.animate {
    animation: revealRightToLeft 0.5s forwards;
    animation-delay: 1s;
    /* 1 second delay */
}

@keyframes revealRightToLeft {
    to {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

/* 4 */
.drawbox.BLTL {
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    border-left: 1px solid #999;
}

.drawbox.BLTL.animate {
    animation: revealBottomToTop 0.5s forwards;
    animation-delay: 1.5s;
    /* 1 second delay */
}

@keyframes revealBottomToTop {
    to {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

/* RSVP Form Styles */
/* * * */

/* Container for content to show above RSVP form */
.aboveRSVP {
    margin-bottom: 0.5rem;
    max-width: 300px;
}

.rsvp-container {
    text-align: center;
    width: 90dvw;
    /* 30% smaller than before */
    max-width: 400px;
    margin-left: 5%;
    margin-right: 5%;
    margin: 0 auto;
    height: 52dvh;
    max-height: 52dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    overflow-x: hidden;
    overflow-y: hidden;
    color: var(--dc-rsvp);
}


/* In Container 2. sub-container for Attending/Not Attending Buttons */
.rsvp-buttons {
    display: flex;
    gap: 3%;
    margin-bottom: 5%;

}

/* (Inside rsvp-buttons) styling for the Attending/Not Attending buttons */
.rsvp-buttons button {
    flex: 1;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--dc-rsvp);
    border: 1px solid var(--dc-rsvp);

    border-radius: 0px;
    cursor: pointer;
    /* transition: background 0.3s; */
    font-size: 16px;
    font-family: "Spectral", serif;
    font-weight: 400;
    font-style: normal;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
    /* stops weird grey highlight on button on iOS when tapping elswhere after clicking button */
}



@media (max-width: 374px) {

    /* Styles for small phones (smaller than iPhone mini) */
    .rsvp-buttons button {
        font-size: 12px;
        padding: 7px 14px;
    }
}


#rsvpResubmitLink {
    -webkit-tap-highlight-color: transparent;
}

.rsvp-buttons button:hover,
.rsvp-buttons button.selected {
    background: var(--dc-rsvp);
    color: #fff;
}

/* In Container 3. rest of form (guests dropdown, message box, submit butotn) */
.rsvp-form {
    transition: all 1s ease;
}

/* Submit Button styling */
.rsvp-form button {
    padding: 10px 20px;
    background: transparent;
    color: var(--dc-rsvp);
    border: none;
    border-radius: 0px;
    border: 1px solid var(--dc-rsvp);
    ;
    cursor: pointer;
    width: 45%;
    font-size: 16px;
    font-family: "Spectral", serif;
    font-weight: 400;
    font-style: normal;
    margin-top: 3%;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    z-index: 10;
}


/* iPhone Mini only */
@media only screen and (max-width: 390px) {
    .rsvp-form textarea {
        margin-top: 2% !important;
    }
}

/* iPhone Mini, regular & pro */
@media only screen and (max-width: 413px) {
    .rsvp-form textarea {
        margin-top: 4%;
    }
}

/* Small iPads */
@media only screen and (min-width: 600px) and (max-width: 1200px) {
    .rsvp-container {
        max-height: 52vh;
        height: 52dvh;
    }
}

/* Box outline drawn for RSVP Form */
.rsvp-animation-box {
    width: 93vw;
    max-width: 550px;
    height: 70vh;
    max-height: 70vh;
    border: 0;
    position: absolute;
    pointer-events: none;
    background-color: transparent;
    z-index: 999;
    display: flex;
    flex-direction: column;
    /* Stack items vertically */
    justify-content: space-between;
    /* This will ensure maximum gap between items */
}

.rsvp-animation-top {
    width: 100%;
    background-color: transparent;
    height: 10vh;
    max-height: 10vh;
    margin: 0;
    padding: 0;
    display: flex;
    position: relative;
    /* Optional, if you need positioning */
    justify-content: center;
    /* Centers image horizontally */
    align-items: center;
    /* Centers image vertically */
}

.rsvp-animation-top img {
    width: 100%;
    height: 70%;
    /* Image height is 90% of the parent container height */
    object-fit: contain;
    /* Keeps the aspect ratio of the image intact */
}

.flip {
    transform: scaleX(-1) scaleY(-1);
}

.rsvp-form button:hover,
.rsvp-form button.selected,
.rsvp-form button.selected:active {
    background: var(--dc-rsvp);
    color: #fff;
}

/* Smooth toggle elements - expand effect to show message box & submit button */
.rsvp-toggle {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 1.2s ease;
    margin-bottom: 0;
}

.rsvp-toggle.rsvp-expanded {
    max-height: 200px;
    opacity: 1;
    transform: translateY(0);
    margin-bottom: 20px;
}

/* Number of guests dropdown */
.rsvp-guest-row select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border-radius: 0px;
    color: black;
    /* This line fixes blue text on iOS */
    background-color: transparent;
    border: none;
    padding: 4px 24px 4px 4px;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    width: auto;
    min-width: 40px;
    background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='12' viewBox='0 0 24 24' width='12' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 18px;
    color: var(--dc-rsvp);
}

.rsvp-guest-row select:focus {
    outline: none;
    /* Removes blue glow/outline on focus */
}

/* Reserve space for this when not shown */
.rsvp-guest-row {
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 0.5em;
    min-height: 2.5em;
    opacity: 0;
    visibility: hidden;
}

.rsvp-guest-row.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.rsvp-guest-row.visible {
    transition: opacity 0.8s ease, visibility 0.8s ease;
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* 'Leave us a message' text area box */
.rsvp-form textarea {
    border: none;
    border-bottom: 1px solid var(--dc-rsvp);
    border-radius: 0;
    font-size: 16px;
    padding: 3px 10px;
    resize: none;
    text-align: center;
    width: 70%;
    font-family: inherit;
    margin-top: 5%;
    line-height: 1.4;
    min-height: 1.4em;
    max-height: 8em;
    overflow-y: auto;
    transition: height 0.8s ease;
    background-color: transparent;
}

.rsvp-form textarea:focus {
    outline: none;
    border-bottom: 1px solid black;
    /* keeps border consistent */
}


/* 'Thanks for submitting' or 'Already Submitted' messages that appear in place of the RSVP form if applicable */
.rsvpCoverMessage {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    width: 100%;
    margin-top: 10%;
}

.rsvpCoverMessage.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.01s ease, visibility 0.01s ease;
}

.rsvpCoverMessage.visible {
    opacity: 1;
    height: 30%;
    visibility: visible;
    transition: opacity 1s ease, visibility 1s ease;
    justify-content: center;
    display: flex;
    flex-direction: column;
}

.rsvpCoverMessage p {
    font-size: 1.2rem;

}







/* Mobile-only layout */
@media (max-width: 768px) {

    .drawbox {
        height: 65vh;
    }


    .rsvp-buttons {
        margin-left: 5%;
        margin-right: 5%;
    }

}

@media (max-width: 374px) {

    /* Styles for small phones (smaller than iPhone mini) */
    .rsvp-buttons {
        font-size: 12px;
    }
}