/**
 * Prompter Generators Enhanced CSS
 * Professional UI design for prompt generators
 */

/* Generator Container */
.prompter-generator {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Generator Header */
.generator-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.generator-header h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
}

.generator-description {
    margin: 0;
    opacity: 0.95;
    font-size: 16px;
    font-weight: 400;
}

/* Use Cases Section */
.use-cases-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.use-cases-section h3 {
    margin-top: 0;
    color: #2d3748;
    font-size: 20px;
    font-weight: 600;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.use-case-card {
    display: flex;
    align-items: flex-start;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.use-case-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.use-case-icon {
    font-size: 24px;
    margin-right: 12px;
    flex-shrink: 0;
}

.use-case-content strong {
    display: block;
    margin-bottom: 5px;
    color: #2d3748;
    font-weight: 600;
}

.use-case-content p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

/* Templates Section */
.templates-section {
    margin-bottom: 25px;
}

.templates-section h3 {
    color: #2d3748;
    font-size: 20px;
    margin-bottom: 8px;
    font-weight: 600;
}

.section-description {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 15px;
}

.template-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.template-btn {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
}

.template-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.template-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.template-icon {
    display: block;
    font-size: 24px;
    margin-bottom: 5px;
}

/* Examples Section */
.examples-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.examples-section h3 {
    margin-top: 0;
    color: #2d3748;
    font-size: 20px;
    font-weight: 600;
}

.example-prompts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.example-prompt-card {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.example-prompt-card:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateX(4px);
}

.example-icon {
    font-size: 18px;
    margin-right: 10px;
    flex-shrink: 0;
}

.example-text {
    flex: 1;
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.use-example-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
}

.use-example-btn:hover {
    background: #5a67d8;
}

/* Main Form Container */
.generator-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.form-section {
    margin-bottom: 20px;
}

.form-section label {
    display: block;
    margin-bottom: 8px;
}

.label-text {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.helper-text {
    font-size: 12px;
    color: #64748b;
    margin-left: 8px;
    font-weight: normal;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea.form-control {
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Advanced Options */
.advanced-toggle {
    margin: 20px 0;
}

.toggle-advanced-btn {
    background: none;
    border: none;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.toggle-advanced-btn:hover {
    color: #5a67d8;
}

.toggle-icon {
    margin-right: 5px;
    transition: transform 0.2s;
    display: inline-block;
}

.toggle-advanced-btn.active .toggle-icon {
    transform: rotate(90deg);
}

.advanced-options {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 10px;
    border: 1px solid #e2e8f0;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}

.btn-secondary {
    background: white;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

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

.btn-icon {
    margin-right: 8px;
    font-size: 18px;
}

/* Result Section */
.prompter-result {
    margin-top: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border: 2px solid #e2e8f0;
    animation: slideIn 0.3s ease;
}

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

.prompter-result h3 {
    margin-top: 0;
    color: #2d3748;
    font-size: 20px;
    font-weight: 600;
}

.prompt-output-wrapper {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    border: 1px solid #cbd5e1;
    position: relative;
}

.prompt-output {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #1a202c;
}

/* Copy Buttons */
.copy-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.copy-btn {
    background: white;
    border: 2px solid #e2e8f0;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.copy-btn.copied {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
    animation: success 0.4s ease;
}

@keyframes success {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.copy-icon {
    margin-right: 6px;
    font-size: 16px;
}

/* Specific AI Tool Buttons */
.copy-to-chatgpt {
    border-color: #10a37f;
    color: #10a37f;
}

.copy-to-chatgpt:hover {
    background: #e6f9f5;
    border-color: #10a37f;
}

.copy-to-claude {
    border-color: #8b5cf6;
    color: #8b5cf6;
}

.copy-to-claude:hover {
    background: #f3e8ff;
    border-color: #8b5cf6;
}

.copy-to-gemini {
    border-color: #ea580c;
    color: #ea580c;
}

.copy-to-gemini:hover {
    background: #fff7ed;
    border-color: #ea580c;
}

/* Feedback Section */
.result-feedback {
    background: #e7f3ff;
    padding: 14px 18px;
    border-radius: 6px;
    margin-top: 15px;
    border-left: 4px solid #0073aa;
}

.result-feedback p {
    margin: 0;
    font-size: 14px;
    color: #1a202c;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .generator-content {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .template-buttons {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .use-cases-grid {
        grid-template-columns: 1fr;
    }
    
    .copy-buttons {
        flex-direction: column;
    }
    
    .copy-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Loading State */
.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Disabled State */
.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Tooltips */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1a202c;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    margin-bottom: 8px;
    z-index: 1000;
    pointer-events: none;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Success Message */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
    display: flex;
    align-items: center;
    animation: slideDown 0.3s ease;
}

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

/* Error Message */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
    display: flex;
    align-items: center;
}

/* Generator Specific Styles */
.chatgpt-generator .generator-header {
    background: linear-gradient(135deg, #10a37f 0%, #0d8c6c 100%);
}

.claude-generator .generator-header {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.midjourney-generator .generator-header {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
}