.custom-page-preview-banner {
    position: sticky;
    top: 0;
    z-index: 1200;
    background: linear-gradient(90deg, #7f1d1d 0%, #b91c1c 45%, #f97316 100%);
    color: #fff;
    box-shadow: 0 14px 30px rgba(127, 29, 29, .25);
    transition: transform .35s ease, opacity .35s ease, max-height .35s ease, box-shadow .35s ease;
    transform-origin: top center;
    overflow: hidden;
    max-height: 140px;
}

.custom-page-preview-banner.is-collapsed {
    transform: translateY(-100%);
    opacity: 0;
    box-shadow: none;
    max-height: 0;
    pointer-events: none;
}

.custom-page-preview-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
}

.custom-page-preview-banner.is-collapsed .custom-page-preview-banner-inner {
    opacity: 0;
    pointer-events: none;
}

.custom-page-preview-toggle {
    position: fixed;
    top: 0px;
    left: 14px;
    z-index: 1201;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 0;
    border-radius: 0 0 14px 14px;
    background: rgba(127, 29, 29, .92);
    color: #fff;
    box-shadow: 0 10px 22px rgba(127, 29, 29, .22);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity .25s ease, transform .25s ease, background .2s ease;
}

.custom-page-preview-toggle:hover,
.custom-page-preview-toggle:focus {
    background: rgba(153, 27, 27, .96);
    color: #fff;
}

.custom-page-preview-toggle.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.custom-page-preview-toggle i {
    font-size: 12px;
    opacity: .9;
}

.custom-page-preview-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.custom-page-preview-dismiss {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    font-weight: 400;
    transition: background .2s ease, border-color .2s ease;
}

.custom-page-preview-dismiss span {
    display: inline-block;
    transform: translateY(-1px);
}

.custom-page-preview-dismiss:hover,
.custom-page-preview-dismiss:focus {
    background: rgba(255, 255, 255, .18);
    border-color: rgba(255, 255, 255, .34);
    color: #fff;
}

.custom-page-preview-banner-copy {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.custom-page-preview-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .28);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    white-space: nowrap;
}

.custom-page-preview-text strong {
    display: block;
    font-size: 15px;
    line-height: 1.3;
}

.custom-page-preview-text span {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    opacity: .92;
    line-height: 1.45;
}

.custom-page-preview-exit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff;
    color: #991b1b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    text-decoration: none;
    white-space: nowrap;
}

.custom-page-preview-exit:hover,
.custom-page-preview-exit:focus {
    color: #7f1d1d;
    text-decoration: none;
}

.custom-page-front-stack > * + * {
    margin-top: 18px;
}

.custom-page-front-wrap {
    /*padding: 24px 0 40px;*/
}

.custom-page-front-wrap.custom-page-width-wide {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.custom-page-front-wrap.custom-page-width-narrow {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.custom-page-front-wrap.custom-page-width-medium {
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.custom-page-front-body {
    display: block;
}

.custom-page-front-feedback {
    margin-bottom: 18px;
}

.custom-page-front-feedback:empty {
    display: none;
}

.custom-page-front-feedback .alert {
    position: relative;
    margin-bottom: 12px;
    padding: 14px 18px;
    border: 1px solid #dbe4ee;
    border-radius: 16px;
    background: #fff;
    color: #132238;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.custom-page-front-feedback .alert strong {
    margin-right: 6px;
}

.custom-page-front-feedback .alert-success {
    border-color: #b7e3d8;
    background: #ecfdf5;
    color: #065f46;
}

.custom-page-front-feedback .alert-danger,
.custom-page-front-feedback .alert-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.custom-page-front-feedback .close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 18px;
    line-height: 1;
    opacity: .7;
}

.custom-page-front-body .custom-page-empty-preview {
    padding: 18px;
    border-radius: 16px;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
    font-weight: 700;
}

@media (max-width: 767px) {
    .custom-page-preview-banner-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .custom-page-preview-banner-copy {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .custom-page-preview-toggle {
        left: 10px;
        right: auto;
        width: auto;
        justify-content: center;
    }

    .custom-page-preview-actions {
        width: 100%;
        justify-content: space-between;
    }
}
