/* The design CSS is theme-qdamarelos.css (from the previous site). This file has only what the SiteManager v3 markup needs. */
.sm-body img {
    max-width: 100%;
    height: auto;
}

/* A link to an item without a URL. The layout sets the class sm-dev outside Production, so visitors do not see the outline. */
.sm-dev .sm-no-route {
    outline: 1px dashed red;
}

/*
    The beige backgrounds of the design. In dark mode (data-bs-theme="dark", from the system setting) the
    text is light, so the backgrounds use the dark colours of the theme.
*/
.bg-beige {
    background-color: #f8f7f4;
}

.bg-card {
    background-color: #f5f3ee;
}

[data-bs-theme=dark] .bg-beige {
    background-color: var(--bs-tertiary-bg);
}

[data-bs-theme=dark] .bg-card {
    background-color: var(--bs-secondary-bg);
}

/* The wave on top of a call to action: the colour of the section above it. */
.wave-white {
    color: #fff;
}

.wave-beige {
    color: #f8f7f4;
}

[data-bs-theme=dark] .wave-white {
    color: var(--bs-body-bg);
}

[data-bs-theme=dark] .wave-beige {
    color: var(--bs-tertiary-bg);
}

/*
    The arrow of the language select in dark mode: white, as the text "PT". The theme keeps a dark
    arrow (#23213F) when the header gets its background on scroll, and then the arrow is not visible.
*/
[data-bs-theme=dark] #headerSM #ddlIdiomas {
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 19'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}

/* Dark mode: the orange of the design on hover, on the common amenity cards and on the buttons. */
[data-bs-theme=dark] #stcComodidadesComuns a:hover .h5,
[data-bs-theme=dark] #stcComodidadesComuns a:hover span {
    color: #ffa500 !important;
}

[data-bs-theme=dark] .btn-secondary {
    --bs-btn-hover-bg: #ffa500;
    --bs-btn-hover-border-color: #ffa500;
    --bs-btn-active-bg: #ffa500;
    --bs-btn-active-border-color: #ffa500;
}

/*
    The buttons of the package (map placeholder, cookie banner and dialog) keep their text as written:
    the theme writes every word of a .btn with a capital letter ("Mostrar O Mapa").
*/
.sm-map .btn,
.sm-consent-banner .btn,
.sm-consent-dialog .btn {
    text-transform: none;
}

/* The home video fills its section. Its size is fixed, so the page does not move when the video starts. */
.qda-video-home {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* White: the experience icons over the photos, and the footer logo. */
.icon-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* The address of the footer and of the contacts page comes from an HTML field. */
#footer .text-white-50 p:last-of-type {
    margin-bottom: 1rem;
}

/* Alojamento: the icons of the amenities in one colour (the SVG files have different colours). */
#pnlAloja_QuartosComodidades svg .st0, #pnlAloja_QuartosComodidades svg path,
#pnlAloja_BungalowsComodidades svg .st0, #pnlAloja_BungalowsComodidades svg path {
    fill: #c18434 !important;
}

/*
    The experience cards: side by side from 992 px (d-lg-flex). Below 992 px they are in a grid,
    two cards in a row on a phone and three on a tablet, so the tall photos do not fill many screens.
*/
@media (max-width: 991.98px) {
    .exp-boxes {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .exp-boxes .card-over img {
        width: 100%;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .exp-boxes {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* The share bar (Blocks/_Share): round buttons with a thin border, on the right. On a phone, on the left. */
.qda-share__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.qda-share__label {
    margin: 0;
    color: var(--bs-emphasis-color);
    font-size: 1.25rem;
}

.qda-share__kit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.qda-share__kit > a,
.qda-share__copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #ccd8e2;
    border-radius: 50%;
    background: var(--bs-body-bg);
    color: var(--bs-emphasis-color);
    font-size: 18px;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}

.qda-share__kit > a:hover,
.qda-share__copy:hover {
    border-color: #fd5902;
    background-color: #fff3ec;
    color: #fd5902;
}

.qda-share a:focus-visible,
.qda-share button:focus-visible {
    outline: 3px solid #fd5902;
    outline-offset: 3px;
}

/* AddToAny puts a span in each link when it loads: keep the icon in the centre. */
.qda-share__kit > a > span {
    float: none !important;
}

.qda-share__status {
    min-height: 1.5em;
    margin: 8px 0 0;
    color: var(--bs-secondary-color);
    font-size: 13px;
    text-align: right;
}

.qda-share__fallback {
    width: 100%;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid #ccd8e2;
    border-radius: 6px;
    font: inherit;
}

[data-bs-theme=dark] .qda-share__kit > a,
[data-bs-theme=dark] .qda-share__copy {
    border-color: var(--bs-border-color);
}

[data-bs-theme=dark] .qda-share__kit > a:hover,
[data-bs-theme=dark] .qda-share__copy:hover {
    border-color: #ffa500;
    background-color: transparent;
    color: #ffa500;
}

@media (max-width: 575.98px) {
    .qda-share__inner {
        justify-content: flex-start;
        gap: 10px;
    }

    .qda-share__label {
        flex-basis: 100%;
    }

    .qda-share__status {
        text-align: left;
    }
}

/* The "Saltar para o conteúdo" link (_Layout): off the screen until it gets the keyboard focus. */
.qda-skip-link {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2000;
    padding: 0.75rem 1.25rem;
    background-color: #16142f;
    color: #fff;
    font-weight: 600;
    transform: translateY(-120%);
}

.qda-skip-link:focus {
    transform: none;
    color: #fff;
}

/* The main element gets the focus from the skip link: no outline on the whole page. */
#main-content:focus {
    outline: none;
}

/* A visible focus on links, buttons, and fields for keyboard users. The theme removes some outlines. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid #ffa500 !important;
    outline-offset: 2px;
}

/*
    The language select: the theme gives 3rem of padding to a 52 px select, so only the arrow showed.
    The width now has space for "PT" or "EN", and the text is white over the video and dark on white.
*/
#pnlIdiomas #ddlIdiomas.form-select {
    min-width: 4.5rem;
    padding-right: 1.75rem;
    padding-left: 0.75rem;
    font-weight: 600;
    color: var(--bs-body-color);
}

/*
    Over the video or the top image (the header without its background): light text, as on the previous site.
    The selector has the id #ddlIdiomas, so that it wins over the rule above.
*/
header:not(.scroll-up):not(.is-sticky):not(.is-fixed) .navbar-light.navbar-link-white .navbar-no-collapse-items #pnlIdiomas #ddlIdiomas.form-select {
    color: rgba(255, 255, 255, 0.55);
    font-weight: 400;
}

/* The main menu: one line for each item ("A Quinta", "The Farm"). */
@media (min-width: 992px) {
    #mainNavbarTheme .nav-link {
        white-space: nowrap;
    }
}

/* The pause button of the home video (Index). */
.qda-video-toggle {
    position: absolute;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 3;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
}

.qda-video-toggle:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* A visitor who asks for less motion: no animations (AOS) and no smooth scroll. */
@media (prefers-reduced-motion: reduce) {
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    html {
        scroll-behavior: auto !important;
    }
}

/* The orange buttons ("Reservar", "Aceitar todos"): the orange of the design. */
.btn-primary {
    --bs-btn-bg: #fd5902;
    --bs-btn-border-color: #fd5902;
    --bs-btn-disabled-bg: #fd5902;
    --bs-btn-disabled-border-color: #fd5902;
}

/* The message after a form is sent (Sm/_FormSent): dark text, as in the design. */
.sm-form-sent h2,
.sm-form-sent p {
    color: var(--bs-body-color);
}

/* The page opens at the form message (#sm-form-contact): space for the fixed header above it. */
.sm-form-sent {
    scroll-margin-top: 15rem;
}
