/* IWT CRM — Public Form Styles */
.iwt-crm-form-wrap {
    max-width: 480px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.iwt-crm-form {
    background: #fff;
    border: 1px solid #dde3ec;
    border-radius: 8px;
    padding: 28px 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
}

.iwt-crm-form-row {
    margin-bottom: 16px;
}

.iwt-crm-form-row label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #1e293b;
}

.iwt-crm-form-row label .required {
    color: #e11d48;
    margin-left: 2px;
}

.iwt-crm-form input[type="text"],
.iwt-crm-form input[type="email"],
.iwt-crm-form input[type="tel"],
.iwt-crm-form textarea,
.iwt-crm-form select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 15px;
    color: #1e293b;
    background: #f8fafc;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.iwt-crm-form input:focus,
.iwt-crm-form textarea:focus,
.iwt-crm-form select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,.12);
    background: #fff;
}

.iwt-crm-form textarea {
    resize: vertical;
    min-height: 90px;
}

.iwt-crm-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #475569;
}

.iwt-crm-submit-btn {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
    letter-spacing: .3px;
}

.iwt-crm-submit-btn:hover {
    background: #005a87;
}

.iwt-crm-submit-btn:active {
    transform: scale(.98);
}

.iwt-crm-submit-btn:disabled {
    opacity: .65;
    cursor: not-allowed;
}

/* Messages */
.iwt-crm-form-message {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.iwt-crm-form-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.iwt-crm-form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ── Checkbox group (checkboxes field type) ──────────────────────────────── */
.iwt-crm-checkboxes-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 0;
}

.iwt-crm-checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: #1e293b;
    line-height: 1.5;
}
.iwt-crm-checkbox-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Custom checkbox box */
.iwt-crm-checkbox-custom {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
/* Checkmark via SVG data URI */
.iwt-crm-checkbox-custom::after {
    content: '';
    display: block;
    width: 10px;
    height: 7px;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 7' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 3.5l2.5 2.5 5.5-5' stroke='%23fff' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/cover no-repeat;
    opacity: 0;
    transform: scale(.6);
    transition: opacity .15s, transform .15s;
}

/* Checked state */
.iwt-crm-checkbox-option input[type="checkbox"]:checked + .iwt-crm-checkbox-custom {
    background: #0073aa;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,.15);
}
.iwt-crm-checkbox-option input[type="checkbox"]:checked + .iwt-crm-checkbox-custom::after {
    opacity: 1;
    transform: scale(1);
}

/* Focus ring */
.iwt-crm-checkbox-option input[type="checkbox"]:focus-visible + .iwt-crm-checkbox-custom {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Hover */
.iwt-crm-checkbox-option:hover .iwt-crm-checkbox-custom {
    border-color: #0073aa;
    background: #f0f7fb;
}

.iwt-crm-checkbox-label { flex: 1; }
