/* ================================
   GUIDEPILOT STYLING SYSTEM
   Educational Content Generator Interface
   ================================ */

/* Custom GuidePilot Panel - Separate from all other panels */
.panel.guidepilot-bg {
    background: #f5f5f5;
    border: 1px solid #c0c0c0;
    margin-bottom: 15px;
    border-radius: 5px;
}

.fd_dark .panel.guidepilot-bg {
    background: #1e2328;
    border: 1px solid #0f1419;
}

/* GuidePilot Panel Internal Structure - Match EchoAI Style */
.guidepilot-assistant-panel {
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
}

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

/* Panel Legend - Match EchoAI Style */
.guidepilot-legend {
    font-weight: bold;
    color: #333;
    padding: 0 10px;
    font-size: 14px;
}

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

/* Form Rows */
.guidepilot-form-row {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.guidepilot-form-row:last-of-type {
    margin-bottom: 10px;
}

/* Labels */
.guidepilot-form-row label {
    font-weight: bold;
    color: #333;
    font-size: 12px;
    margin-bottom: 3px;
}

.fd_dark .guidepilot-form-row label {
    color: #CCCCCC;
}

/* Input Fields */
.guidepilot-form-row select,
.guidepilot-form-row textarea {
    width: 100%;
    max-width: 100%;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 6px 8px;
    font-size: 12px;
    background: #fff;
    transition: border-color 0.2s ease;
}

.guidepilot-form-row select:focus,
.guidepilot-form-row textarea:focus {
    border-color: #369;
    outline: none;
    box-shadow: 0 0 3px rgba(51, 102, 153, 0.3);
}

.fd_dark .guidepilot-form-row select,
.fd_dark .guidepilot-form-row textarea {
    background: #171b24;
    border: 1px solid #242a36;
    color: #CCCCCC;
}

.fd_dark .guidepilot-form-row select:focus,
.fd_dark .guidepilot-form-row textarea:focus {
    border-color: #6bb6ff;
    box-shadow: 0 0 3px rgba(107, 182, 255, 0.3);
}

/* Template Select */
.guidepilot-template-row select {
    height: 32px;
    max-width: 300px;
    width: auto;
}

/* Template Row Spacing */
.guidepilot-template-row {
    margin-bottom: 20px;
}

/* Prompt Textarea */
.guidepilot-form-row textarea {
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
    line-height: 1.4;
}

/* Button Container */
.guidepilot-button-container {
    padding: 12px 0;
    border-top: 1px solid #ddd;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 15px;
}

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

/* Generate Button */
#guidepilot_generate_button {
    font-size: 13px;
    padding: 8px 20px;
    font-weight: bold;
    border-radius: 3px;
    transition: all 0.2s ease;
}

#guidepilot_generate_button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Loading Indicator */
#guidepilot_loading {
    color: #666;
    font-size: 12px;
    font-style: italic;
}

.fd_dark #guidepilot_loading {
    color: #838b98;
}

/* Response Preview Area */
#guidepilot_response_preview {
    margin-top: 15px;
    padding: 15px;
    background: #f0f8ff;
    border: 2px solid #4CAF50;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.1);
}

.fd_dark #guidepilot_response_preview {
    background: #1a2332;
    border: 2px solid #4CAF50;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
}

/* Response Header */
#guidepilot_response_preview h4 {
    margin: 0 0 10px 0;
    color: #2e7d32;
    font-size: 14px;
    font-weight: bold;
}

.fd_dark #guidepilot_response_preview h4 {
    color: #66bb6a;
}

/* Response Textarea */
#guidepilot_response_text {
    width: 100%;
    min-height: 120px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-family: monospace;
    font-size: 12px;
    resize: vertical;
    background: #fff;
    margin-bottom: 10px;
}

.fd_dark #guidepilot_response_text {
    background: #171b24;
    border: 1px solid #242a36;
    color: #CCCCCC;
}

/* Response Action Buttons */
#guidepilot_response_preview div:last-child {
    display: flex;
    gap: 10px;
    align-items: center;
}

#guidepilot_use_button,
#guidepilot_clear_button {
    font-size: 12px;
    padding: 6px 15px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

#guidepilot_use_button:hover,
#guidepilot_clear_button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Educational Focus Enhancements - Icon removed per user request */

/* Responsive Design */
@media (max-width: 768px) {
    .guidepilot-panel {
        padding: 10px;
        margin-top: 8px;
        margin-bottom: 12px;
    }
    
    .guidepilot-form-row {
        margin-bottom: 12px;
    }
    
    .guidepilot-button-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    #guidepilot_response_preview div:last-child {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    #guidepilot_use_button,
    #guidepilot_clear_button {
        width: 100%;
        text-align: center;
    }
}

/* Focus States and Accessibility */
.guidepilot-panel *:focus {
    outline: 2px solid #369;
    outline-offset: 2px;
}

.fd_dark .guidepilot-panel *:focus {
    outline-color: #6bb6ff;
}

/* Animation for Response Preview */
#guidepilot_response_preview {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State Styling */
#guidepilot_loading::before {
    content: "⟳ ";
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}