/* Custom CSS for Print Industry SEO Blog Generator */

/* Import Bebas Neue font if not already loaded */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

/* Root variables for consistent theming */
:root {
    --primary-green: #198754;
    --secondary-green: #20c997;
    --light-bg: #ffffff;
    --card-bg: #f8f9fa;
    --border-color: #dee2e6;
    --text-muted: #6c757d;
    --text-dark: #212529;
}

/* Base body styling */
body {
    background-color: #f8f9fa !important;
    color: var(--text-dark) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
}

/* Brand title styling with Bebas Neue font */
.brand-title {
    font-family: 'Bebas Neue', cursive !important;
    font-weight: 400;
    letter-spacing: 2px;
}

.brand-text {
    font-family: 'Bebas Neue', cursive !important;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

/* Navigation styling */
.navbar {
    background-color: var(--light-bg) !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.step-indicator {
    font-weight: 600;
    color: var(--primary-green);
}

/* Card styling */
.card {
    background-color: var(--card-bg) !important;
    border: none !important;
    box-shadow: none !important;
}

.card-header {
    background-color: var(--primary-green) !important;
    color: #fff !important;
    border-bottom: 1px solid var(--border-color) !important;
}

/* Step preview cards on homepage */
.step-preview {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: rgba(25, 135, 84, 0.1);
    border: 1px solid rgba(25, 135, 84, 0.3);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.step-preview:hover {
    background-color: rgba(25, 135, 84, 0.2);
    border-color: var(--primary-green);
    transform: translateY(-2px);
}

.step-number {
    width: 40px;
    height: 40px;
    background-color: var(--primary-green);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
}

.step-content h5 {
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.step-content p {
    margin-bottom: 0;
    font-size: 0.875rem;
}

/* Feature items on homepage */
.feature-item {
    padding: 1.5rem;
    text-align: center;
}

.feature-item i {
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.feature-item h5 {
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

/* Vertical selection cards (Step 1) */
.vertical-card {
    background-color: rgba(25, 135, 84, 0.05);
    border: 2px solid rgba(25, 135, 84, 0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.vertical-card:hover {
    background-color: rgba(25, 135, 84, 0.1);
    border-color: var(--primary-green);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(25, 135, 84, 0.2);
}

.vertical-card.active {
    background-color: rgba(25, 135, 84, 0.2);
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.3);
}

.vertical-label {
    display: block;
    cursor: pointer;
    margin: 0;
}

.vertical-icon {
    font-size: 2.5rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.vertical-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.vertical-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.4;
}


/* Topic selection cards (Step 4) */
.topic-card {
    background-color: rgba(25, 135, 84, 0.05);
    border: 2px solid rgba(25, 135, 84, 0.2);
    border-radius: 0.5rem;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    height: 100%;
}

.topic-card:hover {
    background-color: rgba(25, 135, 84, 0.1);
    border-color: var(--primary-green);
    transform: translateY(-2px);
}

.topic-card.active {
    background-color: rgba(25, 135, 84, 0.15);
    border-color: var(--primary-green);
    box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.3);
}

.topic-title {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.topic-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Info cards (Step 6) */
.info-card {
    background-color: rgba(25, 135, 84, 0.05);
    border: 1px solid rgba(25, 135, 84, 0.2);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.info-card h6 {
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

.keywords-display .badge {
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

/* Summary editor styling */
.summary-editor {
    position: relative;
}

.summary-editor textarea {
    background-color: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    resize: vertical;
}

.summary-editor textarea:focus {
    background-color: #fff;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
    color: var(--text-dark);
}

/* Generation stages (Step 7) */
.generation-stages {
    margin: 2rem 0;
}

.stage {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    margin-bottom: 1rem;
    background-color: rgba(25, 135, 84, 0.05);
    border: 1px solid rgba(25, 135, 84, 0.2);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.stage.in-progress {
    background-color: rgba(25, 135, 84, 0.1);
    border-color: var(--primary-green);
}

.stage.completed {
    background-color: rgba(25, 135, 84, 0.15);
    border-color: var(--primary-green);
}

.stage-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(25, 135, 84, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    font-size: 1.25rem;
    color: var(--primary-green);
}

.stage.completed .stage-icon {
    background-color: var(--primary-green);
    color: #fff;
}

.stage-content {
    flex: 1;
}

.stage-content h6 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.stage-content p {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.stage-status {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

.progress-container {
    margin: 2rem 0;
}

/* SEO metadata styling (Step 8) */
.seo-metadata {
    background-color: rgba(25, 135, 84, 0.05);
    border: 1px solid rgba(25, 135, 84, 0.2);
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.metadata-item {
    margin-bottom: 1rem;
}

.metadata-item:last-child {
    margin-bottom: 0;
}

.char-count {
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

.char-count.text-success {
    background-color: rgba(25, 135, 84, 0.2);
    color: var(--primary-green);
}

.char-count.text-warning {
    background-color: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

/* Content stats */
.content-stats {
    background-color: rgba(25, 135, 84, 0.05);
    border: 1px solid rgba(25, 135, 84, 0.2);
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Blog content display */
.blog-content {
    margin-top: 2rem;
}

.content-container {
    background-color: rgba(25, 135, 84, 0.05);
    border: 1px solid rgba(25, 135, 84, 0.2);
    border-radius: 0.5rem;
    padding: 0;
    overflow: hidden;
}

.blog-text {
    padding: 2rem;
    background-color: #fff;
    color: #333;
    font-family: Georgia, serif;
    line-height: 1.7;
    max-height: 500px;
    overflow-y: auto;
}

.blog-text h1 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.blog-text h2 {
    color: #34495e;
    font-size: 1.5rem;
    margin: 2rem 0 1rem 0;
    font-weight: 600;
}

.blog-text h3 {
    color: #5d6d7e;
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem 0;
    font-weight: 600;
}

.blog-text p {
    margin-bottom: 1.25rem;
    color: #2c3e50;
}

/* Form styling overrides */
.form-control, .form-select {
    background-color: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    padding: 8px 12px;
    height: auto;
}

.form-control:focus, .form-select:focus {
    background-color: #fff;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
    color: var(--text-dark);
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

/* Selected keywords display */
.selected-keywords-container {
    background-color: rgba(25, 135, 84, 0.05);
    border: 1px solid rgba(25, 135, 84, 0.2);
    border-radius: 0.5rem;
    padding: 1rem;
    min-height: 60px;
    display: flex;
    align-items: center;
}

/* Keyword table styling */
.table-dark {
    --bs-table-bg: rgba(25, 135, 84, 0.05);
    --bs-table-border-color: rgba(25, 135, 84, 0.2);
}

.keyword-row:hover {
    background-color: rgba(25, 135, 84, 0.1) !important;
}

/* Checkbox styling */
.form-check-input:checked {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

/* Button enhancements */
.btn-success {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
    font-weight: 600;
}

.btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

.btn-outline-success {
    color: var(--primary-green);
    border-color: var(--primary-green);
}

.btn-outline-success:hover {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
    color: #fff;
}

/* Toast styling */
.toast {
    background-color: #fff;
    border: 1px solid var(--border-color);
}

/* Spinner customization */
.spinner-border {
    width: 1.5rem;
    height: 1.5rem;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .step-preview {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .vertical-card {
        margin-bottom: 1rem;
    }
    
    .stage {
        flex-direction: column;
        text-align: center;
    }
    
    .stage-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .blog-text {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .content-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .content-actions .btn {
        width: 100%;
    }
}

/* Print styles */
@media print {
    .navbar,
    .card-header,
    .btn,
    .content-actions {
        display: none !important;
    }
    
    .blog-text {
        max-height: none;
        overflow: visible;
        background-color: white !important;
        color: black !important;
        box-shadow: none;
        border: none;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators */
.vertical-card:focus-within,
.topic-card:focus-within {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* Animation for loading states */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Custom scrollbar for webkit browsers */
.blog-text::-webkit-scrollbar {
    width: 8px;
}

.blog-text::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.blog-text::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 4px;
}

.blog-text::-webkit-scrollbar-thumb:hover {
    background: #157347;
}

/* Step 7 responsive button layout */
.step7-button-container {
    display: flex;
    gap: 16px;
    width: 100%;
    margin-top: 30px;
}

#regenerateBtn {
    flex: 0 0 35%;
}

#nextBtn {
    flex: 1 0 65%;
}

/* Mobile responsive layout for phones */
@media (max-width: 640px) {
    /* Step 7 button layout */
    .step7-button-container {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .step7-button-container #nextBtn {
        order: -1; /* Continue button on top */
    }
    
    .step7-button-container .btn {
        width: 100%;
    }
    
    /* Step 9 button layout - target the flex div containing edit and continue buttons */
    div[style*="gap: 16px"][style*="flex"] {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    /* Step 9 - Continue to Final Article button on top */
    div[style*="gap: 16px"][style*="flex"] #nextBtn {
        order: -1 !important;
        width: 100% !important;
    }
    
    /* Step 9 - Edit Summary button below */
    div[style*="gap: 16px"][style*="flex"] #editBtn {
        order: 1 !important;
        width: 100% !important;
    }
    
    /* Ensure all buttons in this container are full width */
    div[style*="gap: 16px"][style*="flex"] .btn {
        width: 100% !important;
        margin: 0 !important;
    }
    
    /* Step 10 button layout - target the article actions container */
    div[style*="gap: 2%"][style*="justify-content: center"] {
        flex-direction: column !important;
        gap: 12px !important;
        max-width: none !important;
    }
    
    /* Step 10 - Copy Article button on top */
    div[style*="gap: 2%"][style*="justify-content: center"] #copyBtn {
        order: 1 !important;
        width: 100% !important;
    }
    
    /* Step 10 - Download dropdown in middle */
    div[style*="gap: 2%"][style*="justify-content: center"] .custom-dropdown {
        order: 2 !important;
        width: 100% !important;
    }
    
    /* Step 10 - Create Another Post button at bottom */
    div[style*="gap: 2%"][style*="justify-content: center"] #createAnotherBtn {
        order: 3 !important;
        width: 100% !important;
    }
    
    /* Ensure all elements in step 10 actions are full width */
    div[style*="gap: 2%"][style*="justify-content: center"] > * {
        width: 100% !important;
        margin: 0 !important;
    }
}
