/* ============================================================
   Banner — fixed, slides in from top on body class toggle
   ============================================================ */
.wdf-crm-banner {
    position: fixed;
    top: -51px;
    left: 0;
    width: 100%;
    height: 51px;
    background-color: #c8102e;
    color: #fff;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    z-index: 999;
    transition: top .3s ease-in-out;
    box-sizing: border-box;
    cursor: pointer;
}

.wdf-crm-banner--visible {
    display: flex;
}

body.wdf-crm-banner-open .wdf-crm-banner {
    top: 0;
}

/* Header shifts down to make room for the banner */
header.wp-block-template-part {
    transition: top .3s ease-in-out;
}

body.wdf-crm-banner-open header.wp-block-template-part {
    top: 51px !important;
}

.wdf-crm-banner__text {
    padding: 0 48px;
    text-align: center;
}

.wdf-crm-banner__close {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.2s ease;
    line-height: 1;
    width: 28px;
}
.wdf-crm-banner__close svg{
    fill: #fff;
}

.wdf-crm-banner__close:hover {
    opacity: 1;
}

/* ============================================================
   Modal — full-screen overlay
   ============================================================ */
.wdf-crm-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* The dialog container receives focus on open (a11y); it must not paint a focus ring. */
.wdf-crm-modal:focus,
.wdf-crm-modal:focus-visible {
    outline: none;
}

.wdf-crm-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.wdf-crm-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.wdf-crm-modal__content {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 1280px;
    background: #fff;
    overflow: hidden;
}

.wdf-crm-modal__image {
    flex: 1 0 50%;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.wdf-crm-modal__form {
    flex: 1 0 50%;
    box-sizing: border-box;
}

.wdf-crm-modal--no-image .wdf-crm-modal__form {
    flex: 1 0 100%;
}

.wdf-crm-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #ffffff;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.2s ease;
    line-height: 1;
}

.wdf-crm-modal__close:hover {
    opacity: 1;
}

@media (max-width: 640px) {
    .wdf-crm-modal__content {
        flex-direction: column;
    }

    .wdf-crm-modal__image {
        flex: 0 0 200px;
        min-height: 200px;
    }
}
