.ccf-form-wrap {
    max-width: 720px;
    /* font-family намеренно НЕ задаём — наследуем через JS + inherit у контролов */
    font-size: inherit;
    line-height: 1.5;
    color: inherit;
}
.ccf-form-wrap *,
.ccf-form-wrap *::before,
.ccf-form-wrap *::after { box-sizing: border-box; }

.ccf-form-title { margin: 0 0 8px; font-size: 22px; font-weight: 600; }
.ccf-form-description { margin: 0 0 20px; color: #555; }

.ccf-form { display: block; }
.ccf-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.ccf-col { flex: 1 1 0; min-width: 0; max-width: 100%; }
.ccf-field { margin-bottom: 16px; }

.ccf-label { display: block; font-weight: 600; font-size: 14px; color: inherit; }
.ccf-req { color: #d63638; }

/* Жёсткий inherit для всех контролов — перебивает правила темы вроде
   input[type="text"] { font-family: ... } */
.ccf-form-wrap input,
.ccf-form-wrap textarea,
.ccf-form-wrap select,
.ccf-form-wrap button,
.ccf-form-wrap label,
.ccf-form-modal input,
.ccf-form-modal textarea,
.ccf-form-modal select,
.ccf-form-modal button,
.ccf-form-modal label {
    font-family: inherit !important;
}

.ccf-input {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid #c3c4c7;
    border-radius: 0;
    background: #fff;
    color: #000;
    outline: none;
    transition: border-color .15s;
    box-sizing: border-box;
}
.ccf-input:focus { border-color: #393185; }
.ccf-input.ccf-error { border-color: #d63638; }

.ccf-textarea {
    resize: vertical;
    min-height: 100px;
    font-size: 15px;
    line-height: 1.5;
}

select.ccf-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3e%3cpath fill='%23333185' d='M6 8L0 0h12z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.ccf-checkbox-group { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 8px; }
.ccf-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}
.ccf-checkbox-label input[type=checkbox],
.ccf-checkbox-label input[type=radio] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.ccf-consent {
    margin: 20px 0;
    padding: 12px;
    background: #f6f7f7;
    border-left: 3px solid #95C77B;
}
.ccf-consent .ccf-checkbox-label { align-items: flex-start; }
.ccf-open-consent {
    margin-left: 6px;
    color: #393185;
    text-decoration: underline;
    white-space: nowrap;
}

.ccf-actions { margin-top: 20px; }
.ccf-btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    background: #95C77B;
    color: #fff;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: filter .15s;
    -webkit-appearance: none;
    appearance: none;
}
.ccf-btn:hover { filter: brightness(.92); }
.ccf-btn:disabled { opacity: .6; cursor: wait; }

.ccf-message { margin-top: 16px; padding: 12px 16px; border-left: 3px solid; }
.ccf-message--success { background: #edfaec; border-color: #46b450; color: #1e5a1f; }
.ccf-message--error   { background: #fdf0f0; border-color: #d63638; color: #7a1719; }

/* Кнопка-триггер */
.ccf-trigger-btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    background: #95C77B;
    color: #fff;
    border: 2px solid transparent;
    border-radius: 0;
    cursor: pointer;
    transition: filter .15s;
    -webkit-appearance: none;
    appearance: none;
}
.ccf-trigger-btn:hover { filter: brightness(.92); }

/* Модалки (в body) */
.ccf-modal,
.ccf-form-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2147483000 !important;
    isolation: isolate;
}
.ccf-modal.is-open,
.ccf-form-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}
.ccf-modal__overlay,
.ccf-form-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 1;
}

/* Сброс box-sizing внутри модалок (они в body, вне .ccf-form-wrap) */
.ccf-modal *,
.ccf-modal *::before,
.ccf-modal *::after,
.ccf-form-modal *,
.ccf-form-modal *::before,
.ccf-form-modal *::after {
    box-sizing: border-box;
}

.ccf-modal__content,
.ccf-form-modal__content {
    position: relative;
    background: #fff;
    max-width: 640px;
    width: calc(100% - 32px);
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
    border-radius: 0;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
    color: #000;
    z-index: 2;
}
.ccf-form-modal__content { max-width: 560px; }

.ccf-modal__content h2 { margin-top: 0; font-size: 20px; }
.ccf-modal__content p { margin: 8px 0; line-height: 1.6; }
.ccf-modal__content ul { padding-left: 22px; }

.ccf-modal__close,
.ccf-form-modal__close {
    position: absolute;
    top: 8px; right: 12px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    color: #666;
    padding: 4px 8px;
    z-index: 3;
}

/* Внутри модалки формы — те же правила раскладки */
.ccf-form-modal__content .ccf-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.ccf-form-modal__content .ccf-col {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 600px) {
    .ccf-row { flex-direction: column; gap: 0; }
    .ccf-col { margin-bottom: 16px; }
    .ccf-checkbox-group { flex-direction: column; gap: 8px; }
    .ccf-btn,
    .ccf-trigger-btn { width: 100%; }
    .ccf-modal__content,
    .ccf-form-modal__content { width: calc(100% - 16px); padding: 16px; }
}