/* Front-end styles for Custom Forms Builder */
.cfb-wrapper {
    margin: 1rem 0;
}

.cfb-form {
    display: block;
}

.cfb-message {
    display: none;
    margin-top: .75rem;
    padding: .5rem .75rem;
    border-radius: 4px;
}

.cfb-message.cfb-ok {
    /*background: #e6ffed;*/
    /*color: #046d1f;*/
    /*border: 1px solid #88d29c;*/
}

.cfb-message.cfb-error {
    /*background: #ffeaea;*/
    /*color: #7d1111;*/
    /*border: 1px solid #e0a4a4;*/
}

.cfb-field {
    margin-bottom: 1rem;
}

.cfb-field label:not(.cfb-error-message) {
    display: block;
    /*font-weight: 600;*/
    margin-bottom: .375rem;
}

/*.cfb-field input[type="text"],*/
/*.cfb-field input[type="email"],*/
/*.cfb-field input[type="tel"],*/
/*.cfb-field textarea {*/
/*    width: 100%;*/
/*    padding: .5rem .6rem;*/
/*    border: 1px solid #ccd0d4;*/
/*    border-radius: 4px;*/
/*}*/

.cfb-field textarea {
    min-height: 100px;
}

/* jQuery Validation Error Styles */
.cfb-field.cfb-has-error input,
.cfb-field.cfb-has-error textarea,
.cfb-field.cfb-has-error select {
    /*border-color: #dc3545 !important;*/
    /*box-shadow: 0 0 0 0.1rem rgba(220, 53, 69, 0.25);*/
}

/* Checkbox and radio button error styles */
.cfb-field.cfb-has-error input[type="checkbox"],
.cfb-field.cfb-has-error input[type="radio"] {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
}

.cfb-error-message {
    display: block !important;
    color: #dc3545;
    font-size: 12px;
    margin-top: 0.3rem;
    margin-bottom: 0;
}

/* Error message positioning for checkbox groups */
.cfb-fieldset .cfb-error-message {
    margin-top: 0.5rem;
    display: block;
}

.cfb-error-message::before, .cfb-error-message::after {
    content: unset !important;
}

.cfb-error-message{
    padding-left: 0 !important;
}



.cfb-field.cfb-has-error label {
    /*color: #dc3545;*/
}

/* Special styling for checkbox and radio labels in error state */
.cfb-field.cfb-has-error .cfb-option label,
.cfb-field.cfb-has-error .terms-container label {
    /*color: #dc3545;*/
}

/* Grid layout styles */
.cfb-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}

.cfb-grid .cfb-field {
    margin-bottom: 0;
}

.cfb-col-12 { grid-column: span 12; }
.cfb-col-6 { grid-column: span 6; }
.cfb-col-4 { grid-column: span 4; }
.cfb-col-3 { grid-column: span 3; }

@media (max-width: 768px) {
    .cfb-grid .cfb-field {
        grid-column: span 12 !important;
    }
}

/* Submit button loading state */
.cfb-submit.is-loading {
    opacity: 0.6;
    cursor: not-allowed;
}

.cfb-submit.is-loading:after {
    content: " ...";
}

.cfb-actions{
    margin-top: 20px;
}

.cfb-actions button {
    width: 100%;
    max-width: unset;
}
