/**
 * AI Segmentation Styling
 * Matches the existing LeadBase design system
 */

/* Import existing CSS variables and base styles */
:root {
    /* Colors from existing system */
    --primary: #5fc73e;
    --primary-dark: #4a9d31;
    --primary-gradient: linear-gradient(135deg, #5fc73e 0%, #4a9d31 100%);
    
    /* Dashboard colors */
    --dashboard-white: #ffffff;
    --dashboard-bg: #f8fafc;
    --dashboard-border: #e2e8f0;
    --dashboard-text: #1e293b;
    --dashboard-text-light: #64748b;
    --dashboard-hover: #f1f5f9;
    
    /* Status colors */
    --success-color: #10b981;
    --success-bg: #d1fae5;
    --error-color: #ef4444;
    --error-bg: #fee2e2;
    --warning-color: #f59e0b;
    --warning-bg: #fef3c7;
    --info-color: #3b82f6;
    --info-bg: #dbeafe;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease-out;
}

/* Base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--dashboard-bg);
    color: var(--dashboard-text);
    line-height: 1.6;
}

/* Main container */
.ai-segmentation-container {
    max-width: 500px;
    margin: 2rem auto;
    background: var(--dashboard-white);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 2rem;
    border: 1px solid var(--dashboard-border);
}

/* Header */
.ai-header {
    text-align: center;
    margin-bottom: 2rem;
}

.ai-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dashboard-text);
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.ai-header h2 i {
    color: var(--primary);
    font-size: 1.25rem;
}

.ai-header p {
    color: var(--dashboard-text-light);
    font-size: 0.95rem;
    margin: 0;
}

/* Input container */
.ai-input-container {
    margin-bottom: 1.5rem;
}

.ai-url-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    margin-bottom: 1rem;
}

/* URL input */
.ai-url-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 1px solid var(--dashboard-border);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--dashboard-text);
    background: var(--dashboard-white);
    transition: var(--transition-fast);
    font-family: inherit;
}

.ai-url-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(95, 199, 62, 0.1);
}

.ai-url-input::placeholder {
    color: var(--dashboard-text-light);
}

/* Next button */
.ai-next-btn {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 0.875rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    font-family: inherit;
    min-width: 100px;
    justify-content: center;
}

.ai-next-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #3a8b22 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(95, 199, 62, 0.3);
}

.ai-next-btn:active:not(:disabled) {
    transform: translateY(0);
}

.ai-next-btn:disabled,
.ai-next-btn.disabled {
    background: var(--dashboard-text-light) !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    transform: none !important;
    box-shadow: none !important;
}

.ai-next-btn .btn-icon {
    font-size: 0.8rem;
    transition: var(--transition-fast);
}

.ai-next-btn:hover:not(:disabled) .btn-icon {
    transform: translateX(2px);
}

/* Status container */
.ai-status-container {
    position: relative;
    min-height: 2.5rem;
}

.ai-status,
.ai-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

/* Status states */
.ai-status.status-info {
    background: var(--info-bg);
    color: var(--info-color);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.ai-status.status-success {
    background: var(--success-bg);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.ai-status.status-error {
    background: var(--error-bg);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.ai-status.status-typing {
    background: var(--warning-bg);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Loading state */
.ai-loading {
    background: var(--dashboard-hover);
    color: var(--dashboard-text-light);
    border: 1px solid var(--dashboard-border);
}

.ai-loading i {
    animation: spin 1s linear infinite;
}

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

/* Help text */
.ai-help-text {
    background: var(--dashboard-hover);
    border: 1px solid var(--dashboard-border);
    border-radius: 6px;
    padding: 0.875rem;
    margin-bottom: 1.5rem;
}

.ai-help-text p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--dashboard-text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-help-text i {
    color: var(--primary);
    font-size: 0.9rem;
}

/* Actions */
.ai-actions {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.ai-cancel-btn {
    background: transparent;
    border: 1px solid var(--dashboard-border);
    color: var(--dashboard-text-light);
    padding: 0.625rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

.ai-cancel-btn:hover {
    background: var(--dashboard-hover);
    border-color: var(--dashboard-text-light);
    color: var(--dashboard-text);
}

.ai-cancel-btn:active {
    transform: scale(0.98);
}

/* Responsive design */
@media (max-width: 768px) {
    .ai-segmentation-container {
        margin: 1rem;
        padding: 1.5rem;
        border-radius: 8px;
    }
    
    .ai-header h2 {
        font-size: 1.25rem;
    }
    
    .ai-url-wrapper {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .ai-next-btn {
        width: 100%;
    }
    
    .ai-url-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

@media (max-width: 480px) {
    .ai-segmentation-container {
        margin: 0.5rem;
        padding: 1.25rem;
    }
    
    .ai-header h2 {
        font-size: 1.125rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .ai-help-text p {
        font-size: 0.8rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .ai-status,
    .ai-loading {
        border-width: 2px;
    }
    
    .ai-url-input:focus {
        box-shadow: 0 0 0 3px rgba(95, 199, 62, 0.3);
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
    
    .ai-loading i {
        animation: none;
    }
}

/* Focus visible for keyboard navigation */
.ai-next-btn:focus-visible,
.ai-cancel-btn:focus-visible,
.ai-url-input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Dark mode support (if implemented) */
@media (prefers-color-scheme: dark) {
    :root {
        --dashboard-white: #1e293b;
        --dashboard-bg: #0f172a;
        --dashboard-border: #334155;
        --dashboard-text: #f1f5f9;
        --dashboard-text-light: #94a3b8;
        --dashboard-hover: #334155;
    }
    
    .ai-segmentation-container {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    }
}

/* ===========================
   AI SEGMENTATION POPUP STYLING
   =========================== */

/* Popup Overlay - Following LeadBase popup system standards */
.ai-segmentation-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10040; /* Higher than person popup (10030) */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ai-segmentation-popup-overlay.active {
    display: flex;
}

/* Popup Modal */
.ai-segmentation-popup-modal {
    background: var(--dashboard-white);
    border: 1px solid var(--dashboard-border);
    width: min(900px, 95vw);
    max-height: 85vh;
    min-height: 600px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: aiPopupSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes aiPopupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Popup Header */
.ai-segmentation-popup-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--dashboard-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.ai-header-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ai-popup-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dashboard-text);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ai-popup-title i {
    color: var(--primary);
    font-size: 1.25rem;
}

.ai-popup-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: var(--dashboard-text-light);
    line-height: 1.4;
    font-weight: 400;
}

.ai-popup-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--dashboard-text-light);
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.ai-popup-close:hover {
    background: var(--dashboard-hover);
    color: var(--primary);
    transform: scale(1.1);
}

/* Progress Steps - More Compact */
.ai-progress-container {
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--dashboard-border);
    background: var(--dashboard-white);
}

.ai-progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    position: relative;
}

/* Step connector lines */
.ai-progress-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--dashboard-border);
    transform: translateY(-50%);
    z-index: 1;
}

.ai-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--dashboard-hover);
    border: 2px solid var(--dashboard-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--dashboard-text-light);
    transition: var(--transition-fast);
}

.step-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--dashboard-text-light);
    text-align: center;
    transition: var(--transition-fast);
}

/* Active step styling */
.ai-step.active .step-number {
    background: var(--primary-gradient);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(95, 199, 62, 0.3);
}

.ai-step.active .step-label {
    color: var(--primary);
}

/* Completed step styling */
.ai-step.completed .step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.ai-step.completed .step-number::after {
    content: '✓';
    font-size: 1rem;
    font-weight: 700;
}

.ai-step.completed .step-label {
    color: var(--primary);
}

/* Progress Bar */
.ai-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--dashboard-border);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.ai-progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 50%; /* 50% for step 1 of 2 steps */
}

/* Popup Body */
.ai-popup-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    min-height: 0;
}

/* Step Content */
.ai-step-content {
    display: none;
    height: 100%;
}

.ai-step-content.active {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ai-step-header removed - content moved to main popup header */

/* Step 1: Analysis Styling */
.ai-analysis-container {
    background: var(--dashboard-hover);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--dashboard-border);
    flex: 1;
}

.ai-url-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--dashboard-white);
    border-radius: 8px;
    border: 1px solid var(--dashboard-border);
}

.ai-url-display label {
    font-weight: 600;
    color: var(--dashboard-text);
    font-size: 0.9rem;
    white-space: nowrap;
}

.ai-url-display span {
    color: var(--primary);
    font-weight: 600;
    word-break: break-all;
    flex: 1;
}

.ai-analysis-status {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--dashboard-text-light);
}

.ai-loading-state i {
    font-size: 2rem;
    color: var(--primary);
}

.ai-loading-state span {
    font-size: 1rem;
    font-weight: 500;
}

/* Countdown Timer Styling */
.ai-countdown-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--dashboard-text-light);
    text-align: center;
}

.ai-countdown-state i {
    font-size: 2rem;
    color: #f59e0b;
}

.ai-countdown-state span {
    font-size: 1rem;
    font-weight: 500;
}

.countdown-timer {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    background: linear-gradient(135deg, rgba(95, 199, 62, 0.1) 0%, rgba(95, 199, 62, 0.05) 100%);
    border: 2px solid rgba(95, 199, 62, 0.3);
    border-radius: 50%;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: countdownPulse 1s ease-in-out infinite alternate;
}

@keyframes countdownPulse {
    from {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(95, 199, 62, 0.4);
    }
    to {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(95, 199, 62, 0);
    }
}

.countdown-explanation {
    font-size: 0.85rem;
    color: var(--dashboard-text-light);
    margin: 0;
    max-width: 300px;
    line-height: 1.4;
}

/* Mobile countdown adjustments */
@media (max-width: 768px) {
    .countdown-timer {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .ai-countdown-state i {
        font-size: 1.5rem;
    }
    
    .countdown-explanation {
        font-size: 0.8rem;
        max-width: 250px;
    }
}

/* Analysis Results */
.ai-analysis-results {
    background: var(--dashboard-white);
    border-radius: 8px;
    border: 1px solid var(--dashboard-border);
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
}

.ai-result-section {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--dashboard-border);
}

.ai-result-section:last-child {
    border-bottom: none;
}

.ai-result-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-result-section p {
    color: var(--dashboard-text);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.ai-result-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-result-list li {
    padding: 0.25rem 0;
    color: var(--dashboard-text);
    font-size: 0.9rem;
}

.ai-result-list li:before {
    content: '•';
    color: var(--primary);
    margin-right: 0.5rem;
    font-weight: bold;
}

/* Analysis Error */
.ai-analysis-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1.25rem;
    color: #dc2626;
}

.ai-analysis-error h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-analysis-error h4 i {
    color: #dc2626;
}

.ai-analysis-error p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Step Actions */
.ai-step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--dashboard-border);
    margin-top: auto;
}

/* AI Buttons */
.ai-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    min-width: 120px;
    justify-content: center;
}

.ai-btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.ai-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #3a8b22 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(95, 199, 62, 0.3);
}

.ai-btn-secondary {
    background: var(--dashboard-hover);
    color: var(--dashboard-text);
    border: 1px solid var(--dashboard-border);
}

.ai-btn-secondary:hover {
    background: var(--dashboard-border);
    transform: translateY(-1px);
}

.ai-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.ai-btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.ai-btn:disabled {
    background: var(--dashboard-text-light) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ai-segmentation-popup-modal {
        width: 95vw;
        max-height: 90vh;
        min-height: 500px;
    }
    
    .ai-segmentation-popup-header {
        padding: 1rem 1.5rem;
    }
    
    .ai-popup-title {
        font-size: 1.25rem;
    }
    
    .ai-popup-subtitle {
        font-size: 0.85rem;
    }
    
    .ai-progress-container {
        padding: 1rem;
    }
    
    .ai-popup-body {
        padding: 1.5rem;
    }
    
    .ai-progress-steps {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .ai-progress-steps::before {
        display: none;
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .ai-step-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .ai-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .ai-segmentation-popup-header {
        padding: 1rem;
    }
    
    .ai-popup-title {
        font-size: 1.1rem;
    }
    
    .ai-popup-subtitle {
        font-size: 0.8rem;
    }
    
    .ai-progress-container {
        padding: 1rem;
    }
    
    .ai-popup-body {
        padding: 1rem;
    }
    
    .ai-analysis-container {
        padding: 1rem;
    }
    
    .ai-url-display {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
}

/* ===========================
   STEP 2: SEGMENTATION SUGGESTIONS STYLING
   =========================== */

.ai-suggestions-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}

.ai-suggestion-description {
    background: var(--dashboard-hover);
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid var(--dashboard-border);
}

.ai-suggestion-description h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dashboard-text);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-suggestion-description h4 i {
    color: var(--primary);
}

.ai-suggestion-description p {
    color: var(--dashboard-text-light);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.segmentation-suggestions {
    background: var(--dashboard-white);
    border-radius: 8px;
    border: 1px solid var(--dashboard-border);
    overflow: hidden;
}

.suggestion-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--dashboard-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--dashboard-text);
    min-width: 140px;
}

.suggestion-label i {
    color: var(--primary);
    font-size: 1rem;
    width: 16px;
    text-align: center;
}

.suggestion-value {
    flex: 1;
    font-size: 0.9rem;
    color: var(--dashboard-text);
    font-weight: 500;
    text-align: right;
}

.suggestion-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.suggestion-tag {
    background: linear-gradient(135deg, rgba(95, 199, 62, 0.1) 0%, rgba(95, 199, 62, 0.05) 100%);
    border: 1px solid rgba(95, 199, 62, 0.3);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.ai-market-analysis {
    background: linear-gradient(135deg, rgba(95, 199, 62, 0.05) 0%, rgba(95, 199, 62, 0.02) 100%);
    border: 1px solid rgba(95, 199, 62, 0.2);
    border-radius: 8px;
    padding: 1.25rem;
}

.ai-market-analysis h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dashboard-text);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-market-analysis h4 i {
    color: var(--primary);
}

.market-description {
    color: var(--dashboard-text);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.ai-loading-suggestions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 3rem 2rem;
    color: var(--dashboard-text-light);
}

.ai-loading-suggestions i {
    font-size: 2rem;
    color: var(--primary);
}

.ai-loading-suggestions span {
    font-size: 1rem;
    font-weight: 500;
}

.ai-error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1.25rem;
    color: #dc2626;
    text-align: center;
}

.ai-error-message h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.ai-error-message h4 i {
    color: #dc2626;
}

.ai-error-message p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Responsive adjustments for suggestions */
@media (max-width: 768px) {
    .suggestion-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        text-align: left;
    }
    
    .suggestion-label {
        min-width: auto;
        justify-content: flex-start;
    }
    
    .suggestion-value {
        text-align: left;
        font-weight: 400;
    }
    
    .suggestion-list {
        justify-content: flex-start;
    }
    
    .suggestion-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
}
