@charset "UTF-8";

/* ========================================
   REGISTRATION FORM DRAG AND DROP STYLES
   ======================================== */

/* Make fields draggable with visual feedback */
.reg-form-ui-preview-field {
    cursor: move;
    transition: all 0.3s ease;
    position: relative;
    padding: 10px 10px 10px 35px; /* Make room for drag handle */
    margin-bottom: 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
	width:90%;
}

/* Style during drag */
.reg-form-ui-preview-field.dragging {
    opacity: 0.5;
    transform: scale(0.95);
    border: 2px dashed #007bff;
    background-color: #f8f9fa;
}

/* Style drop target */
.reg-form-ui-preview-field.drag-over {
    border-top: 3px solid #007bff;
    padding-top: 10px;
}

/* Prevent text selection during drag */
.reg-form-ui-preview-field[draggable="true"] {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Drag handle icon - using compatible characters */
.reg-form-ui-preview-field::before {
    content: "\22EE";  /* Hamburger menu icon - widely supported */
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 20px;
    cursor: move;
    font-weight: normal;
    line-height: 1;
}

/* Hover state for drag handle */
.reg-form-ui-preview-field:hover::before {
    color: #007bff;
}

/* Label styling - flexible but not too wide */
.reg-form-ui-preview-field .reg-form-ui-form-label {
    flex: 0 0 auto;
    max-width: 30%;
    min-width: 150px;
    margin: 0;
    padding-right: 10px;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Input/Select/Textarea styling - compact */
.reg-form-ui-preview-field input,
.reg-form-ui-preview-field select,
.reg-form-ui-preview-field textarea {
    flex: 1 1 auto;
    max-width: 300px;
    min-width: 150px;
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin: 0;
}

/* Textarea specific */
.reg-form-ui-preview-field textarea {
    min-height: 60px;
    resize: vertical;
}

/* Checkbox styling */
.reg-form-ui-preview-field input[type="checkbox"] {
    flex: 0 0 auto;
    width: auto;
    min-width: auto;
    margin-right: 5px;
}

/* Remove/Delete button styling - compact */
.reg-form-ui-preview-field .reg-form-ui-remove-field,
.reg-form-ui-preview-field button:not(.reg-form-ui-btn-primary) {
    flex: 0 0 auto;
    padding: 5px 12px;
    font-size: 13px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
    margin-left: auto;
}

.reg-form-ui-preview-field .reg-form-ui-remove-field:hover,
.reg-form-ui-preview-field button:not(.reg-form-ui-btn-primary):hover {
    background-color: #c82333;
}

/* Required asterisk styling */
.reg-form-ui-preview-field .reg-form-ui-form-label span {
    color: #dc3545;
    margin-left: 2px;
}


/* ========================================
   QUILL WYSIWYG EDITOR CUSTOMIZATION
   ======================================== */

/* Main editor container */
#description-editor {
    min-height: 200px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 0 0 4px 4px;
    font-family: inherit;
}

/* Toolbar styling */
.ql-toolbar {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px 4px 0 0;
    border-bottom: none;
}

.ql-toolbar button {
    outline: none;
}

.ql-toolbar button:hover {
    color: #007bff;
}

.ql-toolbar button.ql-active {
    color: #007bff;
}

/* Editor content area */
.ql-container {
    font-family: inherit;
    font-size: 14px;
}

.ql-editor {
    min-height: 200px;
    padding: 15px;
}

.ql-editor.ql-blank::before {
    color: #999;
    font-style: normal;
}

/* Make sure editor fits within form layout */
.form-group #description-editor {
    width: 100%;
}

/* Hide the original textarea */
textarea[name="Broadcast_Description_input"] {
    display: none !important;
}


/* ========================================
   ADDITIONAL ENHANCEMENT STYLES
   ======================================== */

/* Add smooth transitions to form elements */
.reg-form-ui-preview {
    min-height: 100px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

/* Empty state message */
.reg-form-ui-preview:empty::after {
    content: "No fields added yet. Configure a field above and click 'Add Field to Preview'.";
    display: block;
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-style: italic;
}

/* Preview container when it has fields */
.reg-form-ui-preview:not(:empty) {
    padding: 10px;
}

/* Compact spacing for field items */
.reg-form-ui-preview-field + .reg-form-ui-preview-field {
    margin-top: 8px;
}

/* Hover effect for better UX */
.reg-form-ui-preview-field:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #007bff;
}

/* Focus styles for inputs within fields */
.reg-form-ui-preview-field input:focus,
.reg-form-ui-preview-field select:focus,
.reg-form-ui-preview-field textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.1);
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

@media (max-width: 768px) {
    /* Stack toolbar buttons on mobile */
    .ql-toolbar {
        padding: 8px;
    }
    
    /* Reduce editor height on mobile */
    #description-editor,
    .ql-editor {
        min-height: 150px;
    }
    
    /* Stack registration form fields vertically on mobile */
    .reg-form-ui-preview-field {
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        padding-left: 35px;
    }
    
    .reg-form-ui-preview-field .reg-form-ui-form-label {
        max-width: 100%;
        margin-bottom: 5px;
    }
    
    .reg-form-ui-preview-field input,
    .reg-form-ui-preview-field select,
    .reg-form-ui-preview-field textarea {
        max-width: 100%;
        width: 100%;
    }
    
    .reg-form-ui-preview-field .reg-form-ui-remove-field,
    .reg-form-ui-preview-field button:not(.reg-form-ui-btn-primary) {
        margin-left: 0;
        margin-top: 5px;
        width: 100%;
    }
    
    /* Make drag handle smaller on mobile */
    .reg-form-ui-preview-field::before {
        font-size: 16px;
        left: 8px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Tablet adjustments */
    .reg-form-ui-preview-field .reg-form-ui-form-label {
        max-width: 25%;
        min-width: 120px;
    }
    
    .reg-form-ui-preview-field input,
    .reg-form-ui-preview-field select,
    .reg-form-ui-preview-field textarea {
        max-width: 250px;
    }
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */

/* Focus styles for keyboard navigation */
.reg-form-ui-preview-field:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Screen reader only text for drag handle */
.reg-form-ui-preview-field .sr-only-drag-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    /* Hide drag handles when printing */
    .reg-form-ui-preview-field::before {
        display: none;
    }
    
    /* Hide editor toolbar when printing */
    .ql-toolbar {
        display: none;
    }
    
    /* Show only content */
    #description-editor {
        border: none;
    }
}