/**
 * Feedough Prompter Frontend Styles
 * Exact replica of Feedough AI Prompt Generator UI
 */

/* Container */
.fp-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Framework Tabs */
.fp-framework-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.fp-tab {
    padding: 8px 16px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
    transition: all 0.3s ease;
    position: relative;
}

.fp-tab:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.fp-tab.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.fp-tab.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #007bff;
}

/* Framework Description */
.fp-framework-description {
    padding: 15px;
    background: #e8f4fd;
    border-left: 4px solid #007bff;
    border-radius: 4px;
    margin-bottom: 25px;
}

.fp-framework-description p {
    margin: 0;
    color: #004085;
    font-size: 14px;
}

/* Input Section */
.fp-input-section {
    margin-bottom: 25px;
}

.fp-field-group {
    margin-bottom: 20px;
}

.fp-field-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.fp-field,
.fp-input,
.fp-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    background: white;
}

.fp-field:focus,
.fp-input:focus,
.fp-textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.fp-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.fp-btn {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fp-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.fp-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.fp-btn-secondary {
    background: white;
    color: #495057;
    border: 2px solid #dee2e6;
}

.fp-btn-secondary:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.fp-btn-icon {
    padding: 8px 12px;
    background: white;
    border: 1px solid #dee2e6;
    font-size: 18px;
}

.fp-btn-icon:hover {
    background: #f8f9fa;
}

/* Quick Suggestions */
.fp-quick-suggestions {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.fp-quick-suggestions h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fp-refresh-suggestions {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.fp-refresh-suggestions:hover {
    transform: rotate(180deg);
}

.fp-suggestion-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.fp-suggestion-btn {
    padding: 8px 15px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    font-size: 13px;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fp-suggestion-btn:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(-2px);
}

/* Output Section */
.fp-output-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #dee2e6;
}

.fp-output-section h3 {
    margin: 0 0 20px 0;
    color: #212529;
    font-size: 20px;
}

.fp-prompt-output {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.fp-prompt-text {
    padding: 20px;
    background: white;
    min-height: 150px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
}

.fp-prompt-actions {
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 10px;
}

/* Version History */
.fp-version-history {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.fp-version-history h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
}

.fp-history-list {
    max-height: 200px;
    overflow-y: auto;
}

.fp-history-item {
    padding: 10px;
    margin-bottom: 10px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fp-history-item:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.fp-history-date {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
}

.fp-history-preview {
    font-size: 13px;
    color: #495057;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Improvement Section */
.fp-improve-section {
    margin-top: 30px;
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
}

.fp-improve-section h4 {
    margin: 0 0 10px 0;
    color: #856404;
}

.fp-improve-section p {
    margin: 0 0 15px 0;
    color: #856404;
    font-size: 14px;
}

.fp-improvement-questions {
    margin-top: 20px;
}

.fp-question-group {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 6px;
}

.fp-question-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.fp-question-group input,
.fp-question-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
}

.fp-question-help {
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

/* Error Messages */
.fp-error {
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    color: #721c24;
    margin-top: 20px;
}

/* Loading State */
.fp-loading {
    display: inline-block;
    animation: fp-spin 1s linear infinite;
}

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

.fp-loading-questions {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

/* Success State */
.fp-success {
    padding: 15px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    color: #155724;
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fp-container {
        padding: 15px;
    }
    
    .fp-framework-tabs {
        padding: 10px;
    }
    
    .fp-tab {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .fp-suggestion-buttons {
        gap: 8px;
    }
    
    .fp-suggestion-btn {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .fp-prompt-actions {
        flex-wrap: wrap;
    }
}