.mml-pd-placement-before-post {
    margin: 0 0 2rem;
}

.mml-pd-placement-before-post .mml-pd-wrap {
    margin-bottom: 0;
}

.mml-pd-placement-full_width_after_header {
    width: 100%;
    margin: 0 !important;
    padding: 0.35rem 0 2.15rem;
    background: #fff;
    border-top: 1px solid rgba(38, 48, 66, 0.04);
    border-bottom: 1px solid rgba(38, 48, 66, 0.08);
}

.mml-pd-placement-full_width_after_header .mml-pd-wrap {
    width: min(1170px, calc(100% - 2rem));
    margin: 0 auto;
}
.mml-pd-placement-full_width_after_header.mml-pd-placement-before-post {
    margin: 0 !important;
}

.mml-pd-placement-full_width_after_header .mml-pd-card {
    max-width: none;
}

.mml-pd-placement-before_post_content {
    margin: 0 0 2rem;
}

@media (max-width: 720px) {
    .mml-pd-placement-full_width_after_header {
        padding: 0.35rem 0 1.45rem;
    }

    .mml-pd-placement-full_width_after_header .mml-pd-wrap {
        width: min(100%, calc(100% - 1rem));
    }
}

.mml-pd-wrap {
    margin: 0 0 2rem;
}

.mml-pd-card {
    border: 1px solid rgba(38, 48, 66, 0.12);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(22, 30, 45, 0.06);
    overflow: hidden;
}

.mml-pd-head {
    padding: 1.1rem 1.35rem 0.35rem;
}

.mml-pd-title {
    margin: 0;
    font-size: clamp(1.15rem, 2.3vw, 1.5rem);
    line-height: 1.25;
    font-weight: 700;
    color: #1f2b3d;
}

.mml-pd-description {
    margin: 0.45rem 0 0;
    font-size: 0.98rem;
    line-height: 1.55;
    color: #566173;
}

.mml-pd-form {
    padding: 0.7rem 1.35rem 1.15rem;
}

.mml-pd-primary-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
}

.mml-pd-search,
.mml-pd-field input,
.mml-pd-field select {
    width: 100%;
    min-height: 50px;
    border: 1px solid rgba(35, 47, 68, 0.18);
    border-radius: 11px;
    background: #fff;
    padding: 0 1rem;
    font-size: 1rem;
    color: #243043;
    box-sizing: border-box;
}

.mml-pd-search:focus,
.mml-pd-field input:focus,
.mml-pd-field select:focus {
    outline: 2px solid rgba(66, 83, 138, 0.22);
    border-color: rgba(66, 83, 138, 0.65);
}

.mml-pd-submit {
    min-height: 50px;
    border: 0;
    border-radius: 11px;
    padding: 0 1.35rem;
    background: #3f4f86;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.mml-pd-submit:hover,
.mml-pd-submit:focus {
    transform: translateY(-1px);
    opacity: 0.94;
}

.mml-pd-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin: 0.85rem 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #3f4f86;
    font-size: 0.98rem;
    line-height: 1.2;
    font-weight: 700;
    cursor: pointer;
}

.mml-pd-chevron {
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transition: transform 0.18s ease;
}

.mml-pd-toggle[aria-expanded="true"] .mml-pd-chevron {
    transform: rotate(225deg) translateY(-1px);
}

.mml-pd-advanced {
    margin-top: 0.8rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(38, 48, 66, 0.1);
}

.mml-pd-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr 1fr 1fr 1.25fr;
    gap: 0.75rem;
    align-items: end;
}

.mml-pd-field {
    display: grid;
    gap: 0.38rem;
    min-width: 0;
}

.mml-pd-field-wide {
    grid-column: auto;
}

.mml-pd-field label {
    font-size: 0.9rem;
    line-height: 1.3;
    font-weight: 700;
    color: #334154;
}

.mml-pd-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem;
    margin-top: 0.85rem;
}

.mml-pd-submit-secondary {
    min-height: 46px;
}

.mml-pd-clear {
    color: #3f4f86;
    font-weight: 700;
    text-decoration: none;
}

.mml-pd-clear:hover,
.mml-pd-clear:focus {
    text-decoration: underline;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 720px) {
    .mml-pd-card {
        border-radius: 14px;
    }

    .mml-pd-head {
        padding: 1.15rem 1rem 0.45rem;
    }

    .mml-pd-form {
        padding: 0.8rem 1rem 1rem;
    }

    .mml-pd-primary-row,
    .mml-pd-grid {
        grid-template-columns: 1fr;
    }

    .mml-pd-submit {
        width: 100%;
    }

    .mml-pd-field-wide {
        grid-column: auto;
    }
}
.mml-pd-advanced .mml-pd-field input,
.mml-pd-advanced .mml-pd-field select {
    min-height: 44px;
    padding: 0 0.8rem;
    font-size: 0.94rem;
}

.mml-pd-advanced .mml-pd-field label {
    font-size: 0.82rem;
}

.mml-pd-submit-secondary {
    min-height: 44px;
}

.mml-pd-toggle {
    margin-top: 0.6rem;
}

@media (min-width: 980px) {
    .mml-pd-actions {
        justify-content: flex-end;
        margin-top: 0.75rem;
    }
}

@media (max-width: 1100px) and (min-width: 721px) {
    .mml-pd-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .mml-pd-field-wide {
        grid-column: auto;
    }
}
