/* FLUX Image Editor Styles */
.flux-editor-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.flux-editor-header {
    text-align: center;
    margin-bottom: 30px;
}

.flux-editor-header h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.flux-editor-header p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

/* Upload Section */
.flux-upload-section {
    margin-bottom: 20px;
}

.flux-upload-label {
    display: block;
    cursor: pointer;
}

.flux-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fafafa;
}

.flux-upload-area:hover,
.flux-upload-area.drag-over {
    border-color: #007cba;
    background: #f0f8ff;
}

.flux-upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.7;
}

.flux-upload-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
}

.flux-upload-text strong {
    color: #007cba;
}

.flux-upload-formats {
    font-size: 14px;
    color: #888;
}

/* Preview Section */
.flux-preview-section {
    margin-bottom: 20px;
    text-align: center;
}

.flux-preview-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.flux-preview-section img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Prompt Section */
/* Prompt section removed from public UI (admin-configured server-side) */

/* Submit Section */
.flux-submit-section {
    margin-bottom: 30px;
    text-align: center;
}

.flux-submit-button {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    position: relative;
}

.flux-submit-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #005a87, #004066);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.flux-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.flux-submit-button:active {
    transform: translateY(0);
}

.flux-rate-info {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

/* Loading Spinner */
.flux-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff40;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: flux-spin 1s linear infinite;
    margin-right: 8px;
}

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

/* Result Section */
.flux-result-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.flux-result-section h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
    text-align: center;
}

.flux-result-images {
    display: block;
    margin-bottom: 20px;
}



.flux-result-item {
    text-align: center;
}

.flux-result-item h5 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.flux-result-item img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.flux-result-actions {
    margin-top: 15px;
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.flux-download-button,
.flux-show-button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 140px;
    text-align: center;
}

.flux-download-button {
    background: #28a745;
    color: white;
}

.flux-download-button:hover {
    background: #218838;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.flux-show-button {
    background: #007cba;
    color: white;
}

.flux-show-button:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.flux-edited-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.flux-loading-text {
    color: #666;
    font-size: 14px;
}

/* Fancybox overrides for better mobile experience */
@media (max-width: 768px) {
    .flux-result-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .flux-download-button,
    .flux-show-button {
        width: 100%;
        min-width: auto;
    }
}

/* Error Section */
.flux-error-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    text-align: center;
}

.flux-error-message {
    color: #721c24;
    margin-bottom: 15px;
    font-size: 16px;
}

.flux-retry-button {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.flux-retry-button:hover {
    background: #c82333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .flux-editor-container {
        margin: 10px;
        padding: 15px;
    }
    
    .flux-upload-area {
        padding: 30px 15px;
    }
    
    .flux-upload-icon {
        font-size: 36px;
    }
    
    .flux-submit-button {
        width: 100%;
        min-width: auto;
    }
}

/* Animation for smooth transitions */
.flux-editor-form > div {
    animation: flux-fade-in 0.5s ease-out;
}

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

/* Success state */
.flux-success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

/* CTA Section */
.flux-cta-section {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: flux-cta-slide-up 0.5s ease-out;
}

.flux-cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.flux-cta-content h1,
.flux-cta-content h2,
.flux-cta-content h3,
.flux-cta-content h4,
.flux-cta-content h5,
.flux-cta-content h6 {
    margin: 0 0 15px 0;
    color: #333;
}

.flux-cta-content p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

.flux-cta-content a {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 5px;
}

.flux-cta-content a:hover {
    background: linear-gradient(135deg, #218838, #1ea085);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    color: white;
    text-decoration: none;
}

.flux-cta-content button {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #007cba, #0056b3);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

.flux-cta-content button:hover {
    background: linear-gradient(135deg, #005a87, #004085);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.flux-cta-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

/* CTA Animation */
@keyframes flux-cta-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive CTA */
@media (max-width: 768px) {
    .flux-cta-section {
        margin-top: 20px;
        padding: 20px 15px;
    }
    
    .flux-cta-content a,
    .flux-cta-content button {
        display: block;
        width: 100%;
        margin: 10px 0;
        text-align: center;
    }
}

/* AI Disclaimer Styling */
.flux-disclaimer {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 15px 0;
    text-align: left;
}

.flux-disclaimer p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #856404;
    font-style: italic;
}
