.ailabs {
    padding: 1px 0;
    display: inline-flex;
    float: left;
}

.ailabs div {
    margin-left: 3px;
}

.ailabs-log div {
    padding-bottom: 3px;
    display: flex;
}

.ailabs-log label {
    width: 100px;
    font-weight: bold;
}

.ailabs-log textarea {
    width: 100%;
    resize: vertical;
    /* Allow resizing in both directions */
    overflow: auto;
    /* Add scrollbars when content overflows */
    /* pointer-events: none; */
    /* Make the textarea read-only */
    border: none;
    /* Remove the border from the textarea */
    outline: none;
    /* Remove the outline when focused */
    /* background: inherit; */
    /* Remove the background */
    font-family: inherit;
    /* Inherit the font-family from the parent */
    font-size: inherit;
    /* Inherit the font-size from the parent */
    line-height: inherit;
    /* Inherit the line-height from the parent */
    color: inherit;
    /* Inherit the text color from the parent */
}

/* ================================
   ECHOAI DARK MODE SUPPORT
   ================================ */

/* AI Assistant Panel */
.echoai-assistant-panel {
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.fd_dark .echoai-assistant-panel {
    background: #242a36;
    border: 1px solid #171b24;
}

/* Panel Legend */
.echoai-legend {
    font-weight: bold;
    color: #333;
}

.fd_dark .echoai-legend {
    color: #CCCCCC;
}

/* Form Row Container */
.echoai-form-row {
    margin-bottom: 15px;
}

.echoai-form-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.echoai-control-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Labels */
.echoai-label {
    font-weight: bold;
    white-space: nowrap;
}

.echoai-label-block {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.fd_dark .echoai-label,
.fd_dark .echoai-label-block {
    color: #CCCCCC;
}

/* Dropdowns */
.echoai-dropdown-wide {
    width: 250px;
}

.echoai-dropdown-medium {
    min-width: 150px;
}

.echoai-dropdown-small {
    min-width: 140px;
}

.echoai-dropdown-compact {
    min-width: 120px;
}

.echoai-dropdown-mini {
    min-width: 100px;
}

.echoai-dropdown-narrow {
    min-width: 110px;
}

/* Help Icons */
.echoai-help-icon {
    color: #999;
    cursor: help;
}

.fd_dark .echoai-help-icon {
    color: #838b98;
}

/* Button Container */
.echoai-button-container {
    margin-top: 15px;
    text-align: left;
    padding: 10px 0;
    border-top: 1px solid #ddd;
}

.fd_dark .echoai-button-container {
    border-top: 1px solid #171b24;
}

/* Draft Button */
.echoai-draft-button {
    font-size: 13px;
    padding: 8px 20px;
}

/* Loading Indicator */
.echoai-loading {
    display: none;
    margin-left: 15px;
}

/* Toggle Links */
.echoai-toggle-link {
    cursor: pointer;
    color: #369;
    text-decoration: underline;
    font-size: 11px;
}

.fd_dark .echoai-toggle-link {
    color: #6bb6ff;
}

/* Expandable Sections */
.echoai-expandable-section {
    margin-top: 10px;
}

.echoai-hidden-section {
    display: none;
    margin-top: 8px;
}

/* Custom Prompt Section */
.echoai-custom-textarea {
    width: 100%;
    resize: vertical;
    font-size: 11px;
}

.echoai-help-text {
    font-size: 10px;
    color: #666;
    margin-top: 3px;
}

.fd_dark .echoai-help-text {
    color: #838b98;
}

.echoai-checkbox-container {
    margin-top: 8px;
}

.echoai-section-spacer {
    height: 20px;
}

.echoai-custom-section {
    margin-top: 15px;
    margin-bottom: 15px;
}

.echoai-custom-content {
    margin-top: 10px;
}

.echoai-checkbox-label {
    font-size: 11px;
}

.echoai-checkbox-input {
    margin-right: 5px;
}

/* Prompt header with selection controls */
.echoai-prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.echoai-selection-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.echoai-clear-selection {
    font-size: 11px;
    padding: 4px 8px;
}

.echoai-selection-status {
    font-size: 11px;
    color: #666;
    font-style: italic;
}

.echoai-selection-status.has-selection {
    color: #2e7d32;
    font-weight: bold;
}

/* Prompt editor with selection indication */
.echoai-prompt-editor.has-selection {
    border-color: #4CAF50;
    background: #f0fff0;
}

/* Dark theme support */
.fd_dark .echoai-prompt-editor.has-selection {
    border-color: #4CAF50;
    background: #0d1f0d;
    color: #CCCCCC;
}

/* Prompt Editor */
.echoai-prompt-section {
    margin-bottom: 15px;
}

.echoai-prompt-editor {
    width: 100%;
    min-height: 900px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-family: monospace;
    font-size: 11px;
    resize: vertical;
    background: #fff;
    line-height: 1.4;
}

.fd_dark .echoai-prompt-editor {
    background: #171b24;
    border: 1px solid #242a36;
    color: #CCCCCC;
}

/* Context Info Panel */
.echoai-context-info {
    margin-top: 10px;
    padding: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    display: none;
}

.fd_dark .echoai-context-info {
    background: #171b24;
    border: 1px solid #242a36;
    color: #CCCCCC;
}

/* Response Preview Panel */
.echoai-response-preview {
    margin-top: 10px;
    padding: 10px;
    background: #f0f8ff;
    border: 1px solid #4CAF50;
    border-radius: 5px;
    display: none;
}

.fd_dark .echoai-response-preview {
    background: #1a2332;
    border: 1px solid #4CAF50;
}

.echoai-response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.echoai-response-title {
    color: #2e7d32;
}

.fd_dark .echoai-response-title {
    color: #66bb6a;
}

.echoai-service-confirmation {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

.fd_dark .echoai-service-confirmation {
    color: #838b98;
}

.echoai-response-buttons .echoai-insert-button {
    margin-right: 5px;
}

.echoai-response-textarea {
    width: 100%;
    height: 120px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-family: monospace;
    font-size: 12px;
    resize: vertical;
    background: #fff;
}

.fd_dark .echoai-response-textarea {
    background: #171b24;
    border: 1px solid #242a36;
    color: #CCCCCC;
}

.echoai-response-help {
    font-size: 11px;
    color: #666;
    margin-top: 5px;
}

.fd_dark .echoai-response-help {
    color: #838b98;
}

/* Submit Buttons Section */
.echoai-submit-buttons {
    margin-top: 0;
    border-top: none;
}

/* Log Panel Styles */
.echoai-log-display {
    display: block;
}

.echoai-log-center {
    text-align: center;
}