.editor-contact-form {
    display: block;
    margin: 10px 0;
    padding: 12px;
    border: 1px solid #b8add7;
    border-left: 4px solid #7563a7;
    border-radius: 4px;
    background: #f5f2fa;
    color: #39435b;
    font-size: 13px;
    cursor: default;
}
.editor-contact-form > strong,
.editor-contact-form > span,
.editor-contact-form > small {
    display: block;
    margin-bottom: 6px;
}
.editor-contact-form .contact-block-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 0;
}
.cam-common-form {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid #d5d9e5;
    border-radius: 5px;
    background: #f8f9fc;
    max-width: 100%;
}
.cam-common-form h3 {
    margin: 0 0 8px;
    font-size: 19px;
}
.cam-common-form .cam-contact-serial {
    font-size: 12px;
    margin-bottom: 10px;
}
.cam-common-form label {
    display: block;
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}
.cam-common-form .form-control {
    width: 100%;
    max-width: 100%;
    height: 30px;
    padding: 4px 8px;
    font-size: 13px;
    font-weight: 400;
}
.cam-common-form textarea.form-control {
    height: auto;
    min-height: 65px;
}
.link-picker {
    margin: 4px 0 9px;
    flex: 0 0 100%;
    min-width: 0;
}
.link-picker > .btn {
    font-size: 12px;
    padding: 4px 8px;
}
.link-picker-panel {
    padding: 9px;
    margin-top: 7px;
    background: #f5f4fb;
    border: 1px solid #dcd8ec;
    border-radius: 5px;
}
.link-picker-panel[hidden] {
    display: none;
}
.link-picker-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.link-picker-controls label {
    display: block !important;
    font-size: 12px !important;
    min-width: 0;
    margin: 0 !important;
    flex: 1 1 130px;
}
.link-picker-controls > label:first-child {
    flex: 2 1 240px;
}
.link-picker-controls .form-control {
    width: 100%;
    height: 30px;
    font-size: 12px;
    padding: 4px 7px;
    min-width: 0;
}
.link-picker-status {
    font-size: 12px;
    margin: 6px 0 !important;
    color: #66607c;
}
.link-picker-results {
    max-height: 220px;
    overflow: auto;
}
.link-picker-result {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    border-top: 1px solid #e0ddec;
    background: white;
    padding: 6px 8px;
    color: #35324f;
}
.link-picker-result:hover,
.link-picker-result:focus {
    background: #eeeafa;
}
.link-picker-result strong {
    display: block;
    font-size: 13px;
    line-height: 1.35;
}
.link-picker-result small {
    display: block;
    font-size: 11px;
    color: #6d6684;
    overflow-wrap: anywhere;
}
.link-picker-url {
    line-height: 1.3;
}
.link-picker-nav {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}
.link-picker-nav .btn {
    font-size: 12px;
    padding: 4px 8px;
}
.link-picker-nav button:last-child {
    margin-left: auto;
}
.cam-form-builder {
    width: 740px;
    max-width: calc(100vw - 24px);
    height: calc(100dvh - 24px);
    max-height: 900px;
    padding: 0;
    border: 1px solid #c7cadd;
    border-radius: 8px;
    color: #263149;
    background: #fff;
    box-shadow: 0 12px 60px #18203555;
}
.cam-form-builder[open] {
    display: flex;
    flex-direction: column;
}
.cam-form-builder::backdrop {
    background: #1f263c88;
}
.cam-form-builder label {
    display: block;
    font-size: 12px;
    margin: 0 0 8px;
    font-weight: 600;
    min-width: 0;
}
.cam-form-builder .form-control {
    font-size: 13px;
    height: 30px;
    padding: 4px 7px;
    width: 100%;
    max-width: 100%;
}
.cam-form-builder textarea.form-control {
    height: auto;
    min-height: 62px;
    resize: vertical;
}
.cam-form-builder .btn {
    font-size: 12px;
    padding: 5px 9px;
    white-space: normal;
}
.cam-form-builder .cam-builder-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
}
.cam-custom-field .cam-form-check {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 13px;
    font-weight: 400;
    margin: 3px 0;
}
.cam-form-note {
    font-size: 13px;
    line-height: 1.5;
}
.cam-form-help {
    display: block;
    font-size: 12px;
    color: #657085;
    margin-top: 4px;
    white-space: normal;
}
.cam-form-builder {
    z-index: 4000;
}
.cam-form-builder::backdrop {
    background: #211d1a77;
}
.cam-form-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}
.cam-form-field {
    grid-column: 1/-1;
}
.cam-form-field-half {
    grid-column: auto;
}
.cam-common-form {
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    margin: 20px 0;
}
.cam-common-form label {
    display: block;
}
.cam-common-form input,
.cam-common-form select,
.cam-common-form textarea {
    max-width: 100%;
}
.cam-form-builder .btn {
    padding: 5px 9px;
    font-size: 12px;
    letter-spacing: 0;
    text-transform: none;
}
.cam-form-builder .btn-default {
    border: 1px solid #ccc;
}
.link-picker {
    flex-basis: 100%;
}
.image-filter-preview img {
    max-height: 220px;
    max-width: 100%;
}
.editor-contact-form {
    overflow-wrap: anywhere;
}
@media (max-width: 700px) {
    .cam-form-builder {
        width: calc(100vw - 12px);
        max-width: calc(100vw - 12px);
    }
    .cam-form-fields {
        grid-template-columns: 1fr;
    }
    .cam-form-field-half {
        grid-column: 1/-1;
    }
}

/* Visual form designer: one scrolling body, actions always reachable at 780px. */
.cam-form-builder {
    width: 740px;
    max-width: calc(100vw - 24px);
    height: calc(100dvh - 24px);
    max-height: 900px;
    padding: 0;
    border: 1px solid #c7cadd;
    border-radius: 8px;
    color: #263149;
    background: #fff;
    box-shadow: 0 12px 60px #18203555;
}
.cam-form-builder[open] {
    display: flex;
    flex-direction: column;
}
.cam-form-builder::backdrop {
    background: #1f263c88;
}
.cam-mail-sending {
    overflow: hidden;
}
.cam-send-progress {
    width: 360px;
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 32px);
    overflow: auto;
    padding: 28px 24px;
    border: 1px solid #d9d4eb;
    border-radius: 10px;
    background: #fff;
    color: #273149;
    text-align: center;
    box-shadow: 0 14px 60px #11182755;
    outline: 0;
}
.cam-send-progress::backdrop {
    background: rgba(20, 25, 40, 0.65);
}
.cam-send-progress h2 {
    margin: 14px 0 9px;
    font-size: 21px;
    font-weight: 650;
    line-height: 1.3;
}
.cam-send-progress p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #606a7d;
}
.cam-send-spinner {
    display: inline-block;
    width: 42px;
    height: 42px;
    border: 4px solid #e6e1f1;
    border-top-color: #60549c;
    border-radius: 50%;
    animation: cam-send-spin 0.8s linear infinite;
}
@keyframes cam-send-spin {
    to {
        transform: rotate(360deg);
    }
}
@media (prefers-reduced-motion: reduce) {
    .cam-send-spinner {
        animation: none;
    }
}
@media print {
    .cam-send-progress,
    .cam-send-progress::backdrop {
        display: none !important;
    }
}
.cam-builder-header,
.cam-builder-footer {
    flex: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    background: #f5f4fa;
}
.cam-builder-header {
    justify-content: space-between;
    border-bottom: 1px solid #ddd;
}
.cam-builder-header h2 {
    font-size: 20px;
    margin: 0;
}
.cam-builder-body {
    overflow: auto;
    overscroll-behavior: contain;
    min-height: 0;
    padding: 12px 14px;
    flex: 1;
}
.cam-builder-general {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
}
.cam-builder-hint {
    grid-column: 1/-1;
    color: #657085;
}
.cam-form-builder label {
    display: block;
    font-size: 12px;
    margin: 0 0 8px;
    font-weight: 600;
    min-width: 0;
}
.cam-form-builder .form-control {
    font-size: 13px;
    height: 30px;
    padding: 4px 7px;
    width: 100%;
    max-width: 100%;
}
.cam-form-builder textarea.form-control {
    height: auto;
    min-height: 62px;
    resize: vertical;
}
.cam-form-builder .btn {
    font-size: 12px;
    padding: 5px 9px;
    white-space: normal;
}
.cam-builder-tabs,
.cam-builder-field-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 8px 0;
}
.cam-builder-tabs [aria-pressed='true'] {
    background: #6055a0;
    color: white;
}
.cam-builder-workspace {
    display: grid;
    grid-template-columns: minmax(150px, 30%) minmax(0, 1fr);
    gap: 14px;
}
.cam-builder-workspace[hidden],
.cam-builder-preview[hidden] {
    display: none;
}
.cam-builder-sidebar {
    min-width: 0;
}
.cam-builder-add {
    display: flex;
    gap: 4px;
    position: sticky;
    top: -12px;
    background: #fff;
    padding: 5px 0;
    z-index: 1;
}
.cam-builder-add select {
    min-width: 0;
}
.cam-builder-list {
    max-height: 420px;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.cam-builder-item {
    display: block;
    width: 100%;
    background: #fff;
    color: #39435b;
    text-align: left;
    border: 0;
    border-bottom: 1px solid #e2e3eb;
    padding: 7px;
    font-size: 12px;
    overflow-wrap: anywhere;
}
.cam-builder-item small {
    display: block;
    color: #768197;
    font-size: 11px;
}
.cam-builder-item.active {
    background: #efedf8;
    box-shadow: inset 3px 0 #6858a4;
}
.cam-builder-field {
    min-width: 0;
}
.cam-builder-flags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.cam-form-builder .cam-builder-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
}
.cam-builder-footer {
    border-top: 1px solid #ddd;
}
.cam-builder-footer small {
    font-size: 11px;
    color: #657085;
}
.cam-builder-error {
    flex-basis: 100%;
    margin: 0;
    color: #a12626;
    font-size: 12px;
}
.cam-builder-error:empty {
    display: none;
}
.cam-builder-images {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}
.cam-builder-images img {
    display: block;
    max-width: 100%;
    height: 60px;
    object-fit: contain;
    margin: auto;
}
.cam-builder-images small {
    display: block;
    overflow-wrap: anywhere;
    font-size: 10px;
}
.cam-builder-media {
    padding: 8px;
    background: #f5f4fa;
    margin: 8px 0;
}
.cam-builder-media input[type='file'] {
    max-width: 100%;
    font-size: 12px;
}
.cam-builder-link-preview {
    color: #6055a0;
    text-decoration: underline;
}
.cam-custom-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    margin: 12px 0;
}
.cam-custom-field {
    grid-column: 1/-1;
    min-width: 0;
    overflow-wrap: anywhere;
}
.cam-custom-field.cam-field-half {
    grid-column: auto;
}
.cam-custom-field h4 {
    font-size: 17px;
    color: #514580;
    background: #eceaf5;
    margin: 5px 0 0;
    padding: 8px 10px;
    border-radius: 3px;
}
.cam-custom-field label {
    margin-bottom: 4px;
}
.cam-custom-field .cam-form-check {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 13px;
    font-weight: 400;
    margin: 3px 0;
}
.cam-custom-field input[type='checkbox'],
.cam-custom-field input[type='radio'] {
    width: auto;
    height: auto;
    margin-top: 3px;
    flex: none;
}
.cam-custom-field legend {
    font-size: 13px;
    border: 0;
    margin: 0 0 5px;
    font-weight: 600;
    color: inherit;
}
.cam-custom-field fieldset {
    min-width: 0;
}
.cam-form-note {
    font-size: 13px;
    line-height: 1.5;
}
.cam-form-help {
    display: block;
    font-size: 12px;
    color: #657085;
    margin-top: 4px;
    white-space: normal;
}
.cam-custom-field input[type='color'] {
    width: 85px;
    padding: 2px;
}
.cam-custom-field input[readonly],
.cam-custom-field textarea[readonly] {
    background: #eff0f5;
}
@media (max-width: 560px) {
    .cam-builder-workspace {
        grid-template-columns: 1fr;
    }
    .cam-builder-list {
        max-height: 140px;
    }
    .cam-builder-general {
        grid-template-columns: 1fr;
    }
    .cam-custom-field.cam-field-half {
        grid-column: 1/-1;
    }
    .cam-builder-footer {
        gap: 6px;
    }
    .cam-builder-footer small {
        flex-basis: 100%;
    }
}

.cam-builder-tabs [aria-pressed='true'] {
    background: #6a1a14;
}
.cam-builder-item.active {
    background: #f5eae5;
    box-shadow: inset 3px 0 #6a1a14;
}
.cam-builder-header,
.cam-builder-footer {
    background: #f7f2ed;
}
.cam-form-builder .btn-primary {
    background: #6a1a14;
    border-color: #6a1a14;
}
.cam-custom-field h4 {
    color: #6a1a14;
    background: #f5eae5;
}
