/* Backdrop */
.dialog-overlay::backdrop {
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(3px);
}

/* Dialog */
.dialog-overlay {
    border: 0;
    border-radius: 0.75rem;
    padding: 0;
    max-width: 900px;
    width: calc(100% - 2rem);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.06),
        0 8px 24px rgba(0, 0, 0, 0.14),
        0 24px 56px rgba(0, 0, 0, 0.12);
}

/* Content area */
.dialog-content {
    padding: 2rem 2rem 1.5rem;
}

/* Typography inside RTE */
.dialog-overlay .rte h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #14213d;
    margin-bottom: 1rem;
}
.dialog-overlay .rte p {
    font-size: 1.5rem;
    line-height: 1.72;
    color: #4a4f5a;
    margin-bottom: 0.65rem;
}

/* Form wrapper — no extra padding needed, button bar handles spacing */
.dialog-overlay form {
    position: relative;
    padding: 0;
}

/* Button bar — sits flush at top or bottom of the form */
.dialog-overlay form::after {
    content: '';
}

/* Close button */
.dialog-close-btn {
    display: inline-flex;
    align-items: center;
    background-color: var(--background, var(--color-1));
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.55rem 1.25rem;
    margin: 1rem 1.5rem;
    font-size: 1.5rem;
    font-weight: 400;
    cursor: pointer;
    position: absolute;
    z-index: 255;
    box-shadow: 0 1px 3px rgba(26, 111, 191, 0.3);
    white-space: nowrap;
    transition: background 0.15s;
}
.dialog-close-btn:hover {
    background-color: var(--background, var(--color-1));
    filter: brightness(120%);
}

.dialog-close-btn:focus {
    border-radius: 0.75rem;
}

/* Four positions — content gets matching padding so text never hides under the button */
.bottom-left {
    bottom: 0;
    left: 0;
}
.bottom-right {
    bottom: 0;
    right: 0;
}
.top-left {
    top: 0;
    left: 0;
}
.top-right {
    top: 0;
    right: 0;
}

/* Push content clear of the button (button height ≈ 2.5rem + 1rem margin × 2 = ~4.5rem) */
.dialog-overlay:has(.bottom-left) .dialog-content,
.dialog-overlay:has(.bottom-right) .dialog-content {
    padding-bottom: 5rem;
}
.dialog-overlay:has(.top-left) .dialog-content,
.dialog-overlay:has(.top-right) .dialog-content {
    padding-top: 5rem;
}
