/*
 * Theme primitives the add-on / RICS blocks assume.
 *
 * Those block templates ship all of their own layout CSS, but they lean on a
 * couple of things the damp-specialist theme provides site-wide and Divi has
 * no equivalent for: `.dmp-container` for the content width, and `.dmp-btn`
 * for the booking button. Without them the copy ran edge to edge at x=0, the
 * galleries sized themselves against the whole viewport, and the CTA rendered
 * as a bare underlined link.
 *
 * Values are copied from the damp-specialist stylesheet so these pages match
 * the other five sites rather than approximating them.
 *
 * Scoped to `body.dmp-blocks`, which the child theme adds only on pages using
 * the block template. Scoping on the blocks' own classes was tried first and
 * was not enough: the hub's tile grid sits in `section.dmp-addonpg-list`,
 * which carries no `dmp-addonpg-scope`, so its container stayed full-bleed.
 * The body class covers every block whatever its own classes, and still
 * cannot reach any other page on the site.
 */

/* ---- content width ---- */
.dmp-blocks .dmp-container {
    max-width: min(100% - clamp(4rem, 4rem + ((1vw - .75rem) * 40), 8rem), 80rem);
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 600px) {
    /* The clamp above reserves 4rem of side gutter, which is most of the
       width on a phone. */
    .dmp-blocks .dmp-container {
        max-width: calc(100% - 2.5rem);
    }
}

/* ---- buttons ---- */
.dmp-blocks .dmp-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    text-transform: none;
    cursor: pointer;
    border: 0;
    outline: 0;
    transition: all .4s;
    width: fit-content;
    flex-shrink: 0;
}

.dmp-blocks .dmp-btn_primary,
.dmp-blocks .dmp-btn_secondary {
    font-weight: 500;
    padding: 11px 24px;
    border-radius: 40px;
    border: 1px solid;
}

.dmp-blocks .dmp-btn_red {
    background-color: #e40b1c;
    color: #fff;
    border-color: #e40b1c;
}

.dmp-blocks .dmp-btn_red:hover {
    background-color: #c62626;
    border-color: #c62626;
    color: #fff;
}

.dmp-blocks .dmp-btn_blue {
    background-color: #0655a2;
    color: #fff;
    border-color: #0655a2;
}

.dmp-blocks .dmp-btn_blue:hover {
    background-color: #fff;
    color: #0655a2;
}

/* Divi underlines links inside page content; the buttons carry their own
   colour and need no underline. */
.dmp-blocks a.dmp-btn {
    text-decoration: none !important;
}
