body, html {
    height: 100%;
    margin: 0;
    font: 400 15px/1.4 "Lato", sans-serif;
    color: #777;
    scroll-behavior: smooth;
    background: fixed linear-gradient(31deg,rgba(196, 195, 174, 0.25) 20%, rgba(176, 175, 157, 0.9) 45%, rgba(176, 175, 157, 0.9) 65%, rgba(196, 195, 174, 0.25) 100%);
}

.welcome, .sport, .profil, .merch, .firmagaver, .kontaktos {
    position: relative;
    opacity: 1;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 200;
}

.kontaktos {
    height: 60%;
    z-index: 300;
    box-sizing: border-box;
    pointer-events: none;
}

.welcome {
    height: 60%;
    text-align: justify;
    box-sizing: border-box;
    z-index: 0;

    & > div {
        position: fixed;
        width: 100%;
        padding: 1rem 2rem 2rem 2rem;
        color: #777;

        box-sizing: border-box;

        & > div {
            width: min(100%, 85rem);
            margin-inline: auto;
            box-sizing: border-box;
        }
    }

    & .grid {
        display: grid;
        gap: 2rem;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    & .box {
        background-color: white;
        opacity: 0.75;
        border-radius: 1rem;
        padding: 2rem;
        box-sizing: border-box;
        z-index: 201;
    }

    & .right {
        position: relative;
    }

    & .logo {
        text-align: right;

        & [data='logo'] {
            width: 50%;
            display: inline-block;
            padding: 2rem;
            background-color: white;
            opacity: 0.75;
            border-radius: 1rem;
        }
    }
}

.bottle {
    top: -10%;
    left: 10%;
    width: 40vw;
    position: fixed;
    transform: rotate(-30deg);
    z-index: 1;
}

/* Section background-image is chosen at random from a per-section list in
   index.html (see the "section-images" script). Only layout lives here. */
.sport {
    min-height: 60%;
}

.profil {
    min-height: 60%;
}

.merch {
    min-height: 60%;
}

.firmagaver {
    min-height: 60%;
}

.menu {
    list-style: none;
    display: inline-block;
    margin: 0;
    padding: 0;
    position: relative;
    top: -4rem;
    text-align: left;

    & li {
        margin: 0 1rem 0.5rem 0;
        list-style-type: none;
        float: left;
        padding: 0.5rem 1rem 0.5rem 1rem;
        font-size: 1rem "Lato", sans-serif;
        text-transform: uppercase;
        letter-spacing: 10px;
        background-color: #111;
        color: #f7f7f7;
        cursor: pointer;

        & a {
            color: inherit;
            text-decoration: none;
            display: block;
            margin: -0.5rem -1rem;
            padding: 0.5rem 1rem;
        }
    }
}

.content {
    color: #777;
    background-color: white;
    padding: 0 2rem 2rem 2rem;
    text-align: justify;
    min-height: 40%;
    box-sizing: border-box;
    z-index: 100;
    position: relative;

    & > div {
        width: min(100%, 85rem);
        margin-inline: auto;
        box-sizing: border-box;
        border: 1px solid white;
    }

    & .grid {
        display: grid;
        gap: 2rem;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

.caption {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  text-align: center;
  color: #000;

    & h7 {
        background-color: #111;
        color: #fff;
        padding: 18px;
        font-size: 25px;
        letter-spacing: 10px;
        text-transform: uppercase;
        font-size: 1.5rem;
        color: #f7f7f7;
        line-height: 4.5rem;
    }
}

h1, h2, h3 {
    color: #111;
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-top: 0;
    text-align: left ! important;
}

h1 {
    font: 3rem "Lato", sans-serif;
}

h2 {
    font: 2rem "Lato", sans-serif;
}

h3 {
    font: 1rem "Lato", sans-serif;
}

.kontakt {
    padding-top: 2rem;

    & ul {
        list-style-type: "\1F846";
        margin: 0;
        padding: 0 0 0 2rem;
    
        & li {
            letter-spacing: 0.5rem;
            margin: 0 0 1rem 0;

            & span {
                letter-spacing: normal;
            }
        }
    }

    & .map {
        width: 100%;
        aspect-ratio: 1.4;
        border: 0.1rem solid #777;
        margin: 1rem 0 0 0;

        & iframe {
            width: 100%;
            aspect-ratio: 1.4;
        }
    }
}

.mugshots {
    position: absolute;
    bottom: 0;
    text-align: center;
    width: 100%;

    & img {
        margin: 0 auto 0 auto;
        display: block;
        width: 25vw;
    }
}

@media only screen and (max-width: 600px) {
    .box {
        order: 2;
    }

    .logo {
        order: 1;
    }

    .welcome {
        height: 45%;
    }

    .bottle {
        top: 10%;
        left: 0;
    }

    h1 {
        font: 2rem "Lato", sans-serif;
        margin-top: 0.3rem;
    }

    .content .grid {
        gap: 0;
    }

    .mugshots {

        & img {
            width: 75vw;
        }
    }

    .optional {
        display: none;
    }
}

/* ---- B2B login button + modal ----------------------------------------- */

.login-action {
    margin-top: 1rem;
    text-align: right;
}

.b2b-login-btn {
    background-color: #111;
    color: #f7f7f7;
    text-transform: uppercase;
    letter-spacing: 10px;
    border: none;
    padding: 0.5rem 1rem;
    font: 1rem "Lato", sans-serif;
    cursor: pointer;
}

.b2b-login-btn:hover {
    background-color: #333;
}

.b2b-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.b2b-modal[hidden] { display: none; }

.b2b-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.b2b-modal-content {
    position: relative;
    width: min(95vw, 640px);
    height: min(92vh, 520px);
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.5);
}

.b2b-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #111;
    font-size: 1.75rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.b2b-modal-close:hover { background: #fff; }

.b2b-modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ---- Firmagaver / giftshop login -------------------------------------- */

.firmagaver-login-page {
    background: #111;
    min-height: 100vh;
}

.firmagaver-login {
    width: min(100%, 85rem);
    margin-inline: auto;
    padding: 2rem;
    box-sizing: border-box;
    color: #f7f7f7;
}

.firmagaver-back {
    display: inline-block;
    color: #f7f7f7;
    text-decoration: none;
    letter-spacing: 5px;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border: 1px solid #f7f7f7;
    margin-bottom: 2rem;
}

.firmagaver-back:hover {
    background-color: #f7f7f7;
    color: #111;
}

.firmagaver-login-card {
    position: relative;
    background-color: white;
    color: #777;
    border-radius: 1rem;
    padding: 3rem;
    box-sizing: border-box;
    max-width: 38rem;
    margin: 2rem auto;
}

.firmagaver-login-logo {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 14rem;
    height: auto;
    max-width: 45%;
}

.firmagaver-login-card h1 {
    color: #111;
    letter-spacing: 5px;
    text-transform: uppercase;
    margin: 0 0 0.5rem 0;
    padding-right: 15rem; /* keep the title clear of the logo */
    font: 2rem "Lato", sans-serif;
}

.firmagaver-login-card .lead {
    color: #777;
    margin: 0 0 2rem 0;
    padding-right: 15rem; /* wrap the lead before it runs under the logo */
}

/* Reset and re-style the supplier's form so it inherits our look without us
   having to load their Tailwind sheet. The form is identified by the data
   attribute injected by GiftshopProxy::extractGiftshopForm(). */
.firmagaver-login-card form[data-rh-giftshop-login] {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.firmagaver-login-card form[data-rh-giftshop-login] > * {
    all: revert;
}

.firmagaver-login-card form[data-rh-giftshop-login] [class] {
    /* drop the supplier's class-based styling cheaply */
}

.firmagaver-login-card form[data-rh-giftshop-login] #customerLogo,
.firmagaver-login-card form[data-rh-giftshop-login] > span {
    display: none;
}

.firmagaver-login-card form[data-rh-giftshop-login] input[type="text"],
.firmagaver-login-card form[data-rh-giftshop-login] input[type="email"],
.firmagaver-login-card form[data-rh-giftshop-login] input[type="password"] {
    height: 2.75rem;
    padding: 0 1rem;
    border: 1px solid #ccc;
    border-radius: 0.25rem;
    background: #fff;
    font: 1rem "Lato", sans-serif;
    color: #111;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.firmagaver-login-card form[data-rh-giftshop-login] input[type="text"]:focus,
.firmagaver-login-card form[data-rh-giftshop-login] input[type="email"]:focus,
.firmagaver-login-card form[data-rh-giftshop-login] input[type="password"]:focus {
    border-color: #111;
}

.firmagaver-login-card form[data-rh-giftshop-login] button[type="submit"] {
    background-color: #111;
    color: #f7f7f7;
    text-transform: uppercase;
    letter-spacing: 5px;
    border: none;
    border-radius: 999px;
    padding: 0.75rem 2rem;
    height: 2.75rem;
    cursor: pointer;
    font: 0.85rem "Lato", sans-serif;
    margin-top: 0.5rem;
    align-self: flex-end; /* right-align the login button */
}

/* The supplier sometimes wraps the button (and the "Glemt kodeord" link) in a
   div; make that wrapper a right-aligned column so the link sits beneath the
   button. Harmless if there is no such wrapper. */
.firmagaver-login-card form[data-rh-giftshop-login] div:has(> button[type="submit"]) {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.firmagaver-login-card form[data-rh-giftshop-login] button[type="submit"]:hover {
    background-color: #333;
}

.firmagaver-login-card form[data-rh-giftshop-login] a {
    color: #111;
    text-decoration: none;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.85rem;
    align-self: flex-end; /* "Glemt kodeord" sits under the right-aligned button */
    padding: 0.5rem 0;
}

.firmagaver-login-card form[data-rh-giftshop-login] a:hover {
    text-decoration: underline;
}

.firmagaver-login-card form[data-rh-giftshop-login] fieldset {
    border: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
}

.firmagaver-error {
    background: #fff3f3;
    border: 1px solid #c4004f;
    border-radius: 0.5rem;
    padding: 1.5rem;
    color: #111;
}

.firmagaver-error a {
    color: #c4004f;
}

/* When /b2b/ is rendered inside the modal iframe, strip the standalone
   page chrome so the form fills the modal cleanly. */
html.embedded body.firmagaver-login-page { background: white; }
html.embedded .firmagaver-login          { padding: 1rem; }
html.embedded .firmagaver-back           { display: none; }
html.embedded .firmagaver-login-card     {
    margin: 0 auto;
    padding: 1.5rem;
    box-shadow: none;
    max-width: none;
}
html.embedded .firmagaver-login-card h1  {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

/* Logo sits left of the modal's × close button (which lives in the parent
   frame at the top-right) so the two don't overlap. */
html.embedded .firmagaver-login-logo {
    top: 1.25rem;
    right: 3.5rem;
    width: 12rem;
}

/* reCAPTCHA in the bottom-left corner. Inside the modal iframe, position:fixed
   resolves to the modal viewport, so the widget pins to the modal's lower-left.
   Targets the supplier widget container — adjust the selector if the rendered
   markup uses a different one. */
.firmagaver-login-card form[data-rh-giftshop-login] .g-recaptcha {
    margin-top: 1rem;
}

html.embedded .firmagaver-login {
    padding-bottom: 7rem; /* reserve space so content never hides under the widget */
}

html.embedded .firmagaver-login-card form[data-rh-giftshop-login] .g-recaptcha {
    position: fixed;
    left: 1.5rem;
    bottom: 1.5rem;
    margin: 0;
    z-index: 5;
}

/* Phone-width modal: the enlarged logo would collide with the title side-by-side,
   so move the header down and let it sit beneath the logo. After the base
   html.embedded rules so it wins on source order. */
@media only screen and (max-width: 600px) {
    html.embedded .firmagaver-login-logo {
        top: 1rem;
    }

    html.embedded .firmagaver-login-card {
        padding-top: 5.5rem;
    }

    html.embedded .firmagaver-login-card h1,
    html.embedded .firmagaver-login-card .lead {
        padding-right: 0; /* header sits below the logo, so use full width */
    }
}
