.cms-structure-hidden { display: none !important; }

body {
    font-family: var(--cms-body-font, "Roboto Slab", serif) !important;
    font-size: var(--cms-base-size, 16px);
}

h1, h2, h3, h4, h5, h6,
.navbar, .masthead-heading, .btn, .text-uppercase,
.portfolio-caption-heading {
    font-family: var(--cms-heading-font, "Montserrat", sans-serif) !important;
}

.cms-login-link {
    position: fixed;
    z-index: 1080;
    right: 1rem;
    bottom: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(20, 24, 30, .72);
    color: #fff;
    text-decoration: none;
    opacity: .35;
    transition: opacity .2s ease, transform .2s ease;
}

.cms-login-link:hover,
.cms-login-link:focus-visible { color: #fff; opacity: 1; transform: scale(1.06); }

.cms-toolbar {
    position: fixed;
    z-index: 2000;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .45rem;
    max-width: calc(100% - 1.5rem);
    padding: .65rem;
    border-radius: .8rem;
    background: rgba(24, 28, 34, .96);
    box-shadow: 0 12px 35px rgba(0, 0, 0, .28);
    color: #fff;
    font: 600 14px/1.2 system-ui, sans-serif;
}

.cms-toolbar button {
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: .45rem;
    padding: .6rem .8rem;
    background: #343a40;
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.cms-toolbar button:hover { background: #4b535b; }
.cms-toolbar .cms-save { border-color: #ffc800; background: #ffc800; color: #211b00; }
.cms-toolbar .cms-save[disabled] { opacity: .55; cursor: wait; }
.cms-toolbar-status { align-self: center; min-width: 7rem; text-align: center; font-weight: 500; }

.cms-editable {
    outline: 1px dashed rgba(255, 200, 0, .85);
    outline-offset: 4px;
    cursor: text;
    transition: outline-color .15s ease, background-color .15s ease;
}

.cms-editable:hover,
.cms-editable:focus { outline: 3px solid #ffc800; background-color: rgba(255, 200, 0, .12); }
.cms-preserve-lines { white-space: pre-line; }

.cms-image-editable {
    outline: 3px dashed #28a9e0 !important;
    outline-offset: 4px;
    cursor: pointer !important;
}

.cms-image-editable:hover { filter: brightness(.78); }
.cms-uploading { opacity: .45; pointer-events: none; }
.cms-dirty .cms-toolbar { box-shadow: 0 0 0 3px #ffc800, 0 12px 35px rgba(0, 0, 0, .28); }

.cms-structure-editable { position: relative !important; }

.cms-hide-control {
    position: absolute;
    z-index: 1070;
    border: 0;
    background: #b4232e;
    color: #fff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .28);
    font: 700 12px/1 system-ui, sans-serif;
    cursor: pointer;
}

.cms-hide-section { top: .75rem; right: .75rem; padding: .55rem .7rem; border-radius: .4rem; }
.cms-hide-block { top: .35rem; right: .55rem; width: 1.75rem; height: 1.75rem; border-radius: 50%; font-size: 1.1rem; }
.cms-hide-control:hover { background: #d02a37; transform: scale(1.04); }

.cms-toast {
    position: fixed;
    z-index: 2100;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    max-width: min(560px, calc(100% - 2rem));
    padding: .8rem 1rem;
    border-radius: .55rem;
    background: #20262d;
    color: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
    font: 500 15px/1.4 system-ui, sans-serif;
}

.cms-toast-error { background: #a2212b; }

.cms-dialog {
    width: min(430px, calc(100% - 2rem));
    padding: 0;
    border: 0;
    border-radius: .8rem;
    box-shadow: 0 20px 70px rgba(0, 0, 0, .4);
    font: 500 15px/1.4 system-ui, sans-serif;
}

.cms-dialog::backdrop { background: rgba(0, 0, 0, .62); }
.cms-dialog form { padding: 1.4rem; }
.cms-dialog h2 { margin: 0 0 1rem; font-size: 1.35rem; }
.cms-dialog label { display: block; margin: .8rem 0 .3rem; }
.cms-dialog input { box-sizing: border-box; width: 100%; padding: .7rem; border: 1px solid #bcc3cb; border-radius: .4rem; font: inherit; }
.cms-dialog select { box-sizing: border-box; width: 100%; padding: .7rem; border: 1px solid #bcc3cb; border-radius: .4rem; background: #fff; font: inherit; }
.cms-dialog input[type="range"] { padding: .2rem 0; }
.cms-dialog-help { margin: .8rem 0 0; color: #626b75; font-size: .88rem; }
.cms-dialog menu { display: flex; justify-content: flex-end; gap: .5rem; margin: 1.2rem 0 0; padding: 0; }
.cms-dialog button { padding: .65rem .85rem; border: 0; border-radius: .4rem; cursor: pointer; }
.cms-dialog button[type="submit"] { background: #ffc800; font-weight: 750; }

.cms-hidden-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid #e2e5e8; }
.cms-hidden-row span { overflow-wrap: anywhere; }
.cms-hidden-row button { flex: 0 0 auto; background: #2d3741; color: #fff; }

@media (max-width: 640px) {
    .cms-toolbar { bottom: .5rem; width: calc(100% - 1rem); }
    .cms-toolbar button { flex: 1 1 auto; }
    body.cms-editing { padding-bottom: 8rem; }
}
