.form-elements-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#formBuilderForm ul li:first-child {
    margin-left: 0;
}

#formBuilderForm ul li {
    margin-left: 5px;
}

.form-element {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    cursor: move;
    transition: all 0.2s ease;
}

.form-element:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.form-builder-area {
    min-height: 300px;
    border: 2px dashed #dee2e6;
    padding: 10px;
    border-radius: 4px;
    background-color: #fbfbfb;
}

.form-element-wrapper {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.form-element-wrapper.selected {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.form-element-wrapper.has-condition {
    border-left: 3px solid #17a2b8;
}

.element-header {
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.element-type {
    font-size: 0.75rem;
    background-color: #6c757d;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 8px;
}

.element-label {
    flex-grow: 1;
    font-weight: 500;
}

.element-drag-handle {
    cursor: move;
    color: #6c757d;
}

.element-preview {
    padding: 12px;
}

.element-preview input,
.element-preview select,
.element-preview textarea {
    /* width: 100%; */
    padding: 6px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.element-preview label {
    display: block;
    margin-bottom: 5px;
    font-weight: normal;
}

.placeholder-text {
    color: #6c757d;
    border: 1px dashed #ced4da;
    border-radius: 4px;
}

.checkbox-options,
.radio-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Form Renderer Styles */
.form-renderer label {
    font-weight: 500;
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: .25rem;
    font-size: .875em;
    color: #dc3545;
}

.is-invalid~.invalid-feedback {
    display: block;
}

.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + .75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(.375em + .1875rem) center;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}

textarea.is-invalid {
    padding-right: calc(1.5em + .75rem);
    background-position: top calc(.375em + .1875rem) right calc(.375em + .1875rem);
}

select.is-invalid {
    padding-right: 3rem;
    background-position: right .75rem center, center right 2.25rem;
    background-size: 16px 12px, calc(.75em + .375rem) calc(.75em + .375rem);
}

.form-check-input.is-invalid~.form-check-label,
.was-validated .form-check-input:invalid~.form-check-label {
    color: #dc3545;
}

/* jjj */
#formRenderer .form-label {
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #202124 !important;
    /* Dark slate text */
    letter-spacing: .1px;
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
}

/* Red Required Star Styling */
#formRenderer .text-danger {
    color: #d93025 !important;
    /* Google error red */
    margin-left: 4px;
    font-size: 14px;
}

.form-title {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.8rem;
    margin-bottom: 8px;
}

#formRenderer .form-control,
#formRenderer .form-select {
    border: 2px solid #e2e8f0;
    border-radius: 7px;
    padding: 0.375rem 0.75rem;
    font-size: 0.95rem;
    transition: all 0.2s ease-in-out;
    background-color: #ffffff;
    color: #1e293b;
}

/* Custom Checkbox/Radio Appearance */
.custom-selection-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
}

.form-check:has(.custom-indicator) {
    padding-left: 0;
    margin-bottom: 0;
}

.form-check-label:has(.custom-indicator) {
    position: relative;
    padding-left: 32px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #475569;
    user-select: none;
}

.form-check-label:has(.custom-indicator) .form-check-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.custom-indicator {
    position: absolute;
    top: 2px;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.form-check-input[type="radio"]+.custom-indicator {
    border-radius: 50%;
}

.form-check-input:checked+.custom-indicator {
    background-color: #00a4ef;
    border-color: #00a4ef;
}

.custom-indicator:after {
    content: "";
    position: absolute;
    display: none;
}

.form-check-input:checked+.custom-indicator:after {
    display: block;
}

/* Checkbox checkmark */
.form-check-input[type="checkbox"]+.custom-indicator:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Radio inner circle */
.form-check-input[type="radio"]+.custom-indicator:after {
    top: 6px;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

/* Modernized Drag-and-Drop File Upload Area */
.file-upload-wrapper {
    border: 2px dashed #e2e8f0;
    border-radius: 14px;
    padding: 10px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-upload-wrapper:hover {
    border-color: #eeebff;
    background: #eeebff;
}

.file-upload-icon {
    font-size: 24px;
    color: #00a4ef;
    margin-bottom: 8px;
}

#formRenderer .form-control.is-invalid,
#formRenderer .form-select.is-invalid {
    border-color: #ef4444 !important;
    background-color: #fff5f5;
}
