/* Styles for Generate New Blog component */
/* Container for the Generate New Blog component */
.blog82ai-generate-new-blog {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin: 20px 0;
}
/* Page header styling */
.blog82ai-generate-new-blog .blog82ai-page-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 15px;
}
.blog82ai-generate-new-blog .blog82ai-page-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #23282d;
}
.blog82ai-generate-new-blog .blog82ai-page-header p {
    margin: 5px 0 0;
    color: #666;
    font-size: 14px;
}
/* Form sections */
.blog82ai-generate-new-blog .blog82ai-form-section {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}
.blog82ai-generate-new-blog .blog82ai-form-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}
.blog82ai-generate-new-blog .blog82ai-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.blog82ai-generate-new-blog .blog82ai-form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}
.blog82ai-generate-new-blog .blog82ai-form-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #23282d;
}
.blog82ai-generate-new-blog input[type="text"],
.blog82ai-generate-new-blog select,
.blog82ai-generate-new-blog textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccd0d4;
    border-radius: 3px;
    font-size: 14px;
    color: #23282d;
    margin-top: 4px;
}
/* Form actions */
.blog82ai-generate-new-blog .blog82ai-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}
.blog82ai-generate-new-blog .blog82ai-form-actions .button {
    padding: 8px 16px;
    font-size: 14px;
}

/* Simple Generation Progress Styles */
.generation-progress {
    margin-top: 30px;
    padding: 30px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
}

.progress-content {
    max-width: 500px;
    margin: 0 auto;
}

.progress-header {
    margin-bottom: 30px;
}

.ai-icon {
    font-size: 32px;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

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

.progress-header h3 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 20px;
}

.progress-header p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.progress-step {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.progress-step.active {
    opacity: 1;
    border-color: #007cba;
    background: #f0f8ff;
}

.progress-step.completed {
    opacity: 0.8;
    background: #f0fff0;
    border-color: #4caf50;
}

.step-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    position: relative;
    font-weight: bold;
    font-size: 12px;
}

.progress-step.active .step-icon {
    background: #007cba;
    color: white;
}

.progress-step.completed .step-icon {
    background: #4caf50;
    color: white;
}

.step-spinner {
    position: absolute;
    top: -2px;
    left: -2px;
    width: 34px;
    height: 34px;
    border: 2px solid transparent;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
}

.progress-step.active .step-spinner {
    opacity: 1;
}

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

.step-content {
    text-align: left;
}

.step-text {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 2px;
}

.step-description {
    font-size: 12px;
    color: #666;
}

/* Special styling for image generation step */
#imageGenerationStep .step-icon {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
}

#imageGenerationStep.active .step-icon {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    animation: pulse 2s infinite;
}

#imageGenerationStep .step-spinner {
    border-top-color: #6c5ce7;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(108, 92, 231, 0); }
    100% { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0); }
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007cba, #00a0d2);
    border-radius: 3px;
    width: 0%;
    transition: width 0.5s ease;
}

.progress-footer {
    margin-top: 20px;
}

.typing-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.typing-dots {
    display: flex;
    gap: 3px;
    margin-left: 8px;
}

.typing-dots span {
    width: 4px;
    height: 4px;
    background: #666;
    border-radius: 50%;
    animation: typingDots 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingDots {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.progress-note {
    font-size: 12px;
    color: #888;
    margin: 0;
}

.progress-note-image {
    font-size: 12px;
    color: #0073aa;
    margin: 5px 0 0 0;
    font-style: italic;
}

/* Blog Result Styles */
.blog-result {
    margin-top: 30px;
    padding: 25px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.result-header h3 {
    margin: 0;
    color: #333;
}

.blog-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #007cba;
}

.blog-content {
    margin-bottom: 25px;
}

.blog-content h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

.blog-text {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #007cba;
    max-height: 300px;
    overflow-y: auto;
    line-height: 1.6;
}

.seo-fields {
    margin-bottom: 25px;
    padding: 20px;
    background: #f0f8ff;
    border-radius: 6px;
}

.seo-fields h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.seo-field {
    margin-bottom: 15px;
}

.seo-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.blog-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Button Animation Styles */
#generateBlogBtn {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

#generateBlogBtn:active {
    transform: scale(0.98);
}

.button {
    transition: all 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:disabled,
.button[disabled] {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    transform: none !important;
}

/* Smooth scrolling for all elements */
html {
    scroll-behavior: smooth;
}

/* Result Featured Image Section (appears in blog result above SEO settings) */
.result-featured-image-section {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.result-featured-image-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.result-featured-image-section h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.result-featured-image-section .button-link {
    background: none;
    border: none;
    color: #0073aa;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    padding: 0;
}

.result-featured-image-section .button-link:hover {
    color: #005a87;
    text-decoration: underline;
}

.featured-img-result {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.result-image-regenerate-form {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #ddd;
    margin-top: 15px;
}

.result-image-regenerate-form .form-group {
    margin-bottom: 12px;
}

.result-image-regenerate-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.result-image-regenerate-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 50px;
    font-family: inherit;
    font-size: 14px;
}

.result-image-regenerate-form select {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.result-image-regenerate-form .form-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.regeneration-progress {
    margin-top: 15px;
    text-align: center;
}

.progress-text {
    background: #f0f7ff;
    border: 1px solid #0073aa;
    border-radius: 4px;
    padding: 10px;
    color: #0073aa;
    font-weight: 600;
}

/* Preview Modal Styles */
.blog82ai-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.blog82ai-modal-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.blog82ai-modal-header {
    background: linear-gradient(135deg, #0073aa 0%, #005a8b 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
}

.blog82ai-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.blog82ai-modal-close {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.blog82ai-modal-close:hover {
    opacity: 1;
}

.blog82ai-modal-body {
    padding: 25px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

/* Featured Image Section in Preview */
.preview-featured-image-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.preview-featured-image-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.preview-featured-image-section h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.featured-img-preview {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-image-regenerate-form {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
}

.preview-image-regenerate-form .form-group {
    margin-bottom: 12px;
}

.preview-image-regenerate-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.preview-image-regenerate-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 50px;
    font-family: inherit;
    font-size: 14px;
}

.preview-image-regenerate-form select {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.preview-image-regenerate-form .form-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.regeneration-loading {
    text-align: center;
    padding: 15px;
    background: #f0f7ff;
    border: 1px solid #0073aa;
    border-radius: 6px;
    color: #0073aa;
    font-weight: 500;
}

.loading-bar {
    width: 100%;
    height: 6px;
    background: #e3f2fd;
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}

.loading-fill {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #005a8b);
    width: 0%;
    border-radius: 3px;
    animation: loadingProgress 3s ease-in-out infinite;
}

@keyframes loadingProgress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* SEO Preview */
.seo-preview {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.seo-preview h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
}

.seo-preview .seo-field {
    margin-bottom: 12px;
}

.seo-preview .seo-field label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
    font-size: 13px;
}

.seo-preview .preview-value {
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    min-height: 20px;
}

/* Blog Content Preview */
.blog-content-preview {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

.blog-content-preview h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.preview-blog-content {
    line-height: 1.6;
    color: #333;
    font-size: 14px;
}

.preview-blog-content h1,
.preview-blog-content h2,
.preview-blog-content h3,
.preview-blog-content h4,
.preview-blog-content h5,
.preview-blog-content h6 {
    margin: 20px 0 10px 0;
    color: #23282d;
}

.preview-blog-content p {
    margin: 0 0 15px 0;
}

.preview-blog-content ul,
.preview-blog-content ol {
    margin: 0 0 15px 20px;
}

.preview-blog-content li {
    margin: 5px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog82ai-modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 85vh;
    }
    
    .blog82ai-modal-header {
        padding: 15px 20px;
    }
    
    .blog82ai-modal-body {
        padding: 20px;
    }
    
    .preview-featured-image-section .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ===== Premium Feature Styling ===== */

/* Disabled feature styling */
.blog82ai-disabled-feature {
    opacity: 0.6;
    position: relative;
    cursor: not-allowed;
}

.blog82ai-disabled-feature input[type="checkbox"] {
    cursor: not-allowed !important;
    pointer-events: none;
}

.blog82ai-disabled-feature label {
    cursor: not-allowed !important;
    color: #999 !important;
}

/* Premium badge styling */
.blog82ai-premium-badge {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 10px;
    margin-left: 8px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

/* Tooltip container */
.blog82ai-tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Tooltip icon */
.blog82ai-tooltip-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: #667eea;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 12px;
    font-weight: bold;
    cursor: help;
    margin-left: 6px;
    transition: all 0.3s ease;
}

.blog82ai-tooltip-icon:hover {
    background-color: #764ba2;
    transform: scale(1.1);
}

/* Tooltip text */
.blog82ai-tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    transition: opacity 0.3s, visibility 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Tooltip arrow */
.blog82ai-tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* Show tooltip on hover */
.blog82ai-tooltip-icon:hover + .blog82ai-tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Premium feature upgrade notice */
.blog82ai-upgrade-notice {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-left: 4px solid #667eea;
    padding: 12px 16px;
    margin-top: 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
}

.blog82ai-upgrade-notice a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.blog82ai-upgrade-notice a:hover {
    color: #764ba2;
    text-decoration: underline;
}
