/**
 * AI Event Assistant - Panel Styles
 * Sidebar panel integrated with Create Event modal
 * Design system: Dark theme (#0F2A2A), green accent (#8BFF22)
 */

/* ========================================
   AI ASSISTANT PANEL
======================================== */
.ai-assistant-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 440px;
    height: 100%;
    background: linear-gradient(180deg, #0d2626 0%, #0a1f1f 100%);
    border-left: 1px solid rgba(139, 255, 34, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 10001;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.4);
    animation: aiPanelSlideIn 0.3s ease-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ai-assistant-panel.ai-resizing {
    transition: none !important;
    animation: none !important;
}

/* ========================================
   RESIZE HANDLE (left edge)
======================================== */
.ai-panel-resize-handle {
    position: absolute;
    left: -3px;
    top: 0;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    z-index: 10;
    background: transparent;
    transition: background 0.2s ease;
}

.ai-panel-resize-handle:hover,
.ai-resizing .ai-panel-resize-handle {
    background: rgba(139, 255, 34, 0.3);
}

.ai-panel-resize-handle::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 40px;
    border-radius: 1px;
    background: rgba(139, 255, 34, 0.15);
    transition: all 0.2s ease;
}

.ai-panel-resize-handle:hover::after,
.ai-resizing .ai-panel-resize-handle::after {
    background: rgba(139, 255, 34, 0.5);
    height: 60px;
}

.ai-assistant-panel.hidden {
    display: none;
}

@keyframes aiPanelSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes aiPanelSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ========================================
   PANEL HEADER
======================================== */
.ai-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(139, 255, 34, 0.1);
    background: rgba(15, 42, 42, 0.9);
    flex-shrink: 0;
    min-height: 60px;
}

.ai-panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    overflow: visible;
}

.ai-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #8BFF22 0%, #5ce600 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 10px rgba(139, 255, 34, 0.3);
}

.ai-panel-title h3 {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
}

.ai-plan-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.ai-plan-badge.none {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.ai-plan-badge.starter {
    background: rgba(139, 255, 34, 0.15);
    color: #8BFF22;
    border: 1px solid rgba(139, 255, 34, 0.3);
}

.ai-plan-badge.pro {
    background: rgba(100, 149, 237, 0.2);
    color: #6495ED;
    border: 1px solid rgba(100, 149, 237, 0.3);
}

.ai-plan-badge.enterprise {
    background: rgba(186, 85, 211, 0.2);
    color: #BA55D3;
    border: 1px solid rgba(186, 85, 211, 0.3);
}

.ai-panel-controls {
    display: flex;
    gap: 4px;
}

.ai-panel-controls button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-panel-controls button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* ========================================
   USAGE BAR
======================================== */
.ai-usage-bar {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ai-usage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.ai-usage-plan-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(139, 255, 34, 0.15);
    color: #8BFF22;
}
.ai-usage-plan-badge.none {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
}
.ai-usage-plan-badge.starter {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
}
.ai-usage-plan-badge.pro {
    background: rgba(155, 89, 182, 0.15);
    color: #bb8fce;
}
.ai-usage-plan-badge.enterprise {
    background: rgba(241, 196, 15, 0.15);
    color: #f1c40f;
}

.ai-usage-reset {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 500;
}

.ai-usage-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.ai-usage-label {
    width: 90px;
    flex-shrink: 0;
    font-size: 10px;
    white-space: nowrap;
}

.ai-usage-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.ai-usage-item span:first-child {
    width: 70px;
    flex-shrink: 0;
}

.ai-progress {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.ai-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8BFF22, #5ce600);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.ai-progress-fill.warning {
    background: linear-gradient(90deg, #ffc107, #ff9800);
}

.ai-progress-fill.danger {
    background: linear-gradient(90deg, #ff4d4d, #ff1744);
}

.ai-usage-count {
    width: 50px;
    text-align: right;
    font-family: 'SF Mono', 'Cascadia Code', monospace;
    font-size: 10px;
}

/* ========================================
   PANEL BODY
======================================== */
.ai-panel-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

/* ========================================
   MESSAGES AREA
======================================== */
.ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

.ai-messages::-webkit-scrollbar {
    width: 4px;
}

.ai-messages::-webkit-scrollbar-track {
    background: transparent;
}

.ai-messages::-webkit-scrollbar-thumb {
    background: rgba(139, 255, 34, 0.2);
    border-radius: 2px;
}

.ai-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 255, 34, 0.4);
}

/* ========================================
   MESSAGE BUBBLES
======================================== */
.ai-message {
    display: flex;
    gap: 10px;
    animation: aiMessageFadeIn 0.3s ease-out;
}

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

.ai-message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.ai-message-user .ai-message-avatar {
    background: rgba(100, 149, 237, 0.2);
}

.ai-message-assistant .ai-message-avatar {
    background: rgba(139, 255, 34, 0.15);
}

.ai-message-content {
    flex: 1;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    word-wrap: break-word;
}

.ai-message-user .ai-message-content {
    background: rgba(100, 149, 237, 0.1);
    border: 1px solid rgba(100, 149, 237, 0.15);
    padding: 10px 14px;
    border-radius: 12px 12px 12px 4px;
}

.ai-message-assistant .ai-message-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 10px 14px;
    border-radius: 12px 12px 12px 4px;
}

.ai-message-content strong {
    color: #8BFF22;
    font-weight: 600;
}

.ai-message-content em {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.ai-message-content code {
    background: rgba(139, 255, 34, 0.1);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
    font-family: 'SF Mono', monospace;
    color: #8BFF22;
}

/* Thinking/loading state */
.ai-message-thinking .ai-message-content {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.ai-message-thinking .ai-message-content::after {
    content: '';
    display: inline-block;
    width: 12px;
    animation: aiDots 1.5s infinite;
}

@keyframes aiDots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

/* Warning state */
.ai-message-warning .ai-message-content {
    background: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.2);
}

/* Error state */
.ai-message-error .ai-message-content {
    background: rgba(255, 77, 77, 0.1);
    border-color: rgba(255, 77, 77, 0.2);
}

/* Success state */
.ai-message-success .ai-message-content {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.2);
}

/* Suggestion state */
.ai-message-suggestion .ai-message-content {
    background: rgba(139, 255, 34, 0.05);
    border-color: rgba(139, 255, 34, 0.15);
    border-left: 3px solid #8BFF22;
}

/* Upgrade prompt */
.ai-message-upgrade .ai-message-content {
    background: linear-gradient(135deg, rgba(186, 85, 211, 0.1), rgba(100, 149, 237, 0.1));
    border-color: rgba(186, 85, 211, 0.2);
}

/* ========================================
   SUGGESTION ACTIONS (Apply/Modify/Dismiss)
======================================== */
.ai-suggestion-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.ai-apply-btn {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid rgba(139, 255, 34, 0.3);
    background: rgba(139, 255, 34, 0.1);
    color: #8BFF22;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-apply-btn:hover {
    background: rgba(139, 255, 34, 0.2);
    border-color: #8BFF22;
    box-shadow: 0 2px 8px rgba(139, 255, 34, 0.2);
}

.ai-apply-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ai-apply-btn.primary {
    background: #8BFF22;
    color: #0F2A2A;
    border-color: #8BFF22;
    font-weight: 600;
}

.ai-apply-btn.primary:hover {
    background: #7aee11;
    box-shadow: 0 2px 12px rgba(139, 255, 34, 0.4);
}

.ai-apply-btn.earlybird {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border-color: rgba(255, 193, 7, 0.3);
    font-weight: 600;
}

.ai-apply-btn.earlybird:hover {
    background: rgba(255, 193, 7, 0.25);
    box-shadow: 0 2px 12px rgba(255, 193, 7, 0.3);
}

.ai-apply-btn.promo {
    background: rgba(155, 89, 182, 0.15);
    color: #bb8fce;
    border-color: rgba(155, 89, 182, 0.3);
    font-weight: 600;
}

.ai-apply-btn.promo:hover {
    background: rgba(155, 89, 182, 0.25);
    box-shadow: 0 2px 12px rgba(155, 89, 182, 0.3);
}

.ai-apply-btn.group {
    background: rgba(100, 149, 237, 0.15);
    color: #6495ED;
    border-color: rgba(100, 149, 237, 0.3);
    font-weight: 600;
}

.ai-apply-btn.group:hover {
    background: rgba(100, 149, 237, 0.25);
    box-shadow: 0 2px 12px rgba(100, 149, 237, 0.3);
}

/* ========================================
   COLLAPSIBLE SECTIONS
======================================== */
.ai-collapsible-section {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-collapsible-section[data-section="chat"] {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.ai-section-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.02);
}

.ai-section-toggle:hover {
    background: rgba(139, 255, 34, 0.04);
}

.ai-section-toggle-icon {
    font-size: 9px;
    color: rgba(139, 255, 34, 0.5);
    transition: transform 0.2s ease;
    width: 12px;
    text-align: center;
}

.ai-section-toggle.collapsed .ai-section-toggle-icon {
    transform: rotate(0deg);
}

.ai-section-toggle-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.45);
}

.ai-section-toggle:hover .ai-section-toggle-label {
    color: rgba(255, 255, 255, 0.65);
}

.ai-section-content {
    transition: max-height 0.3s ease, opacity 0.2s ease;
    overflow: hidden;
}

.ai-section-content.collapsed {
    max-height: 0 !important;
    opacity: 0;
    overflow: hidden;
}

/* Chat section fills available space when open */
#ai-section-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#ai-section-chat.collapsed {
    flex: 0;
}

/* Actions & unlocks sections don't need flex growth */
#ai-section-actions,
#ai-section-unlocks {
    max-height: 500px; /* generous max for animation */
}

/* ========================================
   QUICK ACTIONS
======================================== */
.ai-quick-actions {
    padding: 8px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex-shrink: 0;
}

.ai-action-btn {
    flex: 1;
    min-width: calc(50% - 6px);
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.ai-action-btn:hover {
    border-color: rgba(139, 255, 34, 0.3);
    background: rgba(139, 255, 34, 0.05);
    color: #8BFF22;
}

.ai-action-btn:disabled:not(.ai-action-locked):not(.ai-action-missing) {
    opacity: 0.4;
    cursor: not-allowed;
}

.ai-action-btn:disabled:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.5);
}

.ai-action-btn.primary {
    border-color: rgba(139, 255, 34, 0.3);
    background: rgba(139, 255, 34, 0.1);
    color: #8BFF22;
    font-weight: 600;
    min-width: 100%;
}

.ai-action-btn.primary:hover {
    background: rgba(139, 255, 34, 0.2);
}

.ai-action-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ========================================
   STAGE-AWARE UI
======================================== */

/* Stage indicator badge at top of actions */
.ai-stage-indicator {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    margin-bottom: 4px;
    background: rgba(139, 255, 34, 0.06);
    border: 1px solid rgba(139, 255, 34, 0.12);
    border-radius: 8px;
}

.ai-stage-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    background: rgba(139, 255, 34, 0.2);
    color: #8BFF22;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.ai-stage-name {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Action button internal layout */
.ai-action-icon {
    font-size: 12px;
    flex-shrink: 0;
}

.ai-action-label {
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Cost indicator label (replaces dot) */
.ai-cost-label {
    font-size: 9px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 8px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    line-height: 1.4;
}
.ai-cost-free {
    background: rgba(139, 255, 34, 0.1);
    color: rgba(139, 255, 34, 0.7);
}
.ai-cost-low {
    background: rgba(139, 255, 34, 0.12);
    color: #8BFF22;
}
.ai-cost-medium {
    background: rgba(255, 215, 0, 0.12);
    color: #FFD700;
}
.ai-cost-high {
    background: rgba(255, 107, 107, 0.12);
    color: #FF6B6B;
}
.ai-cost-upgrade {
    background: rgba(155, 89, 182, 0.15);
    color: #bb8fce;
    cursor: pointer;
}

/* Lock icon */
.ai-lock-icon {
    font-size: 10px;
    opacity: 0.5;
    flex-shrink: 0;
    margin-left: 2px;
}

/* Locked action (not yet unlocked, future stage) */
.ai-action-btn.ai-action-locked {
    opacity: 0.35;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.01);
}

.ai-action-btn.ai-action-locked:hover {
    opacity: 0.5;
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.5);
}

/* Missing fields (unlocked but data not yet entered) */
.ai-action-btn.ai-action-missing {
    opacity: 0.55;
    cursor: help;
    border-style: dashed;
    border-color: rgba(255, 215, 0, 0.2);
}

.ai-action-btn.ai-action-missing:hover {
    opacity: 0.75;
    border-color: rgba(255, 215, 0, 0.4);
    background: rgba(255, 215, 0, 0.03);
    color: rgba(255, 215, 0, 0.8);
}

/* Quota exhausted */
.ai-action-btn.ai-action-exhausted {
    opacity: 0.45;
    cursor: pointer;
    border-color: rgba(155, 89, 182, 0.2);
    border-style: dashed;
}
.ai-action-btn.ai-action-exhausted:hover {
    opacity: 0.65;
    border-color: rgba(155, 89, 182, 0.4);
    background: rgba(155, 89, 182, 0.04);
}

/* Loading state on action button */
.ai-action-btn.ai-action-loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}
.ai-action-btn.ai-action-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 8px;
    width: 12px;
    height: 12px;
    margin-top: -6px;
    border: 2px solid rgba(255,255,255,0.15);
    border-top-color: #8BFF22;
    border-radius: 50%;
    animation: ai-btn-spin 0.6s linear infinite;
}
@keyframes ai-btn-spin {
    to { transform: rotate(360deg); }
}

/* Shake animation for exhausted click */
@keyframes ai-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}
.ai-shake {
    animation: ai-shake 0.5s ease;
}

/* ========================================
   STEP 1 — TITLE SCORE
======================================== */
.ai-title-score {
    background: rgba(13, 38, 38, 0.6);
    border: 1px solid rgba(139, 255, 34, 0.1);
    border-radius: 10px;
    padding: 14px;
    margin-top: 6px;
}

.ai-score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ai-score-grade {
    font-size: 1.6em;
    font-weight: 800;
    text-shadow: 0 0 10px currentColor;
}

.ai-score-meter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.ai-score-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.ai-score-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease-out, background 0.3s;
}

.ai-score-value {
    font-weight: 700;
    font-size: 0.9em;
    min-width: 55px;
    text-align: right;
}

.ai-score-title {
    font-style: italic;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85em;
    margin-bottom: 10px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

.ai-score-breakdown {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 10px;
    font-size: 0.82em;
}

.ai-score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 6px;
    border-radius: 4px;
}

.ai-score-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.ai-score-label {
    color: rgba(255, 255, 255, 0.6);
}

.ai-score-points {
    font-weight: 600;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.ai-score-tips {
    background: rgba(139, 255, 34, 0.04);
    border: 1px solid rgba(139, 255, 34, 0.1);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    font-size: 0.82em;
}

.ai-score-tips strong {
    display: block;
    margin-bottom: 6px;
    color: rgba(139, 255, 34, 0.9);
}

.ai-score-tip {
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 3px;
    padding-left: 4px;
}

.ai-score-meta {
    font-size: 0.75em;
    color: rgba(139, 255, 34, 0.5);
    text-align: right;
    font-style: italic;
}

.ai-score-stats {
    display: flex;
    gap: 16px;
    font-size: 0.82em;
    color: rgba(255, 255, 255, 0.6);
    margin: 6px 0 4px;
}

/* ========================================
   STEP 1 — DESCRIPTION PREVIEW
======================================== */
.ai-description-preview {
    background: rgba(13, 38, 38, 0.5);
    border: 1px solid rgba(139, 255, 34, 0.08);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.88em;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.ai-description-preview::-webkit-scrollbar {
    width: 4px;
}

.ai-description-preview::-webkit-scrollbar-thumb {
    background: rgba(139, 255, 34, 0.2);
    border-radius: 2px;
}

.ai-keyword-badge {
    display: inline-block;
    padding: 2px 8px;
    margin: 2px 3px;
    background: rgba(139, 255, 34, 0.08);
    border: 1px solid rgba(139, 255, 34, 0.15);
    border-radius: 12px;
    font-size: 0.82em;
    color: rgba(139, 255, 34, 0.8);
}

/* ========================================
   STEP 1 — IMPROVE DESCRIPTION STATS
======================================== */
.ai-improve-stats {
    display: flex;
    gap: 16px;
    font-size: 0.82em;
    color: rgba(255, 255, 255, 0.6);
    padding: 6px 8px;
    background: rgba(139, 255, 34, 0.03);
    border-radius: 6px;
}

.ai-improve-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========================================
   STEP 1 — CATEGORY SUGGESTIONS
======================================== */
.ai-category-suggestions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-category-item {
    background: rgba(13, 38, 38, 0.5);
    border: 1px solid rgba(139, 255, 34, 0.08);
    border-radius: 8px;
    padding: 10px 12px;
}

.ai-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.ai-category-header strong {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
}

.ai-confidence {
    font-weight: 700;
    font-size: 0.85em;
}

.ai-confidence-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.ai-confidence-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s ease-out;
}

.ai-category-reason {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
}

/* ========================================
   CHAT INPUT
======================================== */
.ai-panel-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(139, 255, 34, 0.1);
    background: rgba(15, 42, 42, 0.9);
    flex-shrink: 0;
}

.ai-chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px 8px 6px 14px;
    transition: border-color 0.2s ease;
}

.ai-chat-input-wrapper:focus-within {
    border-color: rgba(139, 255, 34, 0.4);
    box-shadow: 0 0 0 2px rgba(139, 255, 34, 0.1);
}

#ai-chat-input {
    flex: 1;
    border: none;
    background: none;
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    resize: none;
    min-height: 22px;
    max-height: 120px;
    padding: 4px 0;
    font-family: inherit;
    outline: none;
}

#ai-chat-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.ai-send-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: #8BFF22;
    color: #0F2A2A;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.ai-send-btn:hover {
    background: #7aee11;
    box-shadow: 0 2px 8px rgba(139, 255, 34, 0.3);
    transform: scale(1.05);
}

.ai-send-btn:active {
    transform: scale(0.95);
}

.ai-send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.ai-send-btn svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   TOGGLE BUTTON (inside modal footer)
======================================== */
.ai-toggle-btn {
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid rgba(139, 255, 34, 0.3);
    background: rgba(139, 255, 34, 0.08);
    color: #8BFF22;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.ai-toggle-btn:hover {
    background: rgba(139, 255, 34, 0.15);
    border-color: #8BFF22;
    box-shadow: 0 2px 12px rgba(139, 255, 34, 0.25);
    transform: translateY(-1px);
}

/* ========================================
   MODAL LAYOUT ADJUSTMENT
   When AI panel is open, shrink the create event modal
======================================== */
body.ai-panel-open .create-event-modal .modal-container {
    margin-right: 450px;
    max-width: calc(800px - 50px);
    transition: all 0.3s ease;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1200px) {
    .ai-assistant-panel {
        width: 380px;
    }
    
    body.ai-panel-open .create-event-modal .modal-container {
        margin-right: 390px;
    }
}

@media (max-width: 768px) {
    .ai-assistant-panel {
        width: 100%;
        height: 60vh;
        top: auto;
        bottom: 0;
        left: 0;
        border-left: none;
        border-top: 1px solid rgba(139, 255, 34, 0.15);
        border-radius: 20px 20px 0 0;
        animation: aiPanelSlideUp 0.3s ease-out;
    }
    
    @keyframes aiPanelSlideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    body.ai-panel-open .create-event-modal .modal-container {
        margin-right: 0;
        max-width: 100%;
        max-height: 40vh;
    }
    
    .ai-toggle-btn {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .ai-quick-actions {
        padding: 8px 16px;
    }
    
    .ai-action-btn {
        min-width: calc(50% - 4px);
        padding: 6px 8px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .ai-assistant-panel {
        height: 70vh;
    }
    
    .ai-panel-header {
        padding: 12px 16px;
    }
    
    .ai-messages {
        padding: 12px 16px;
    }
}

/* ========================================
   LOADING SPINNER (for generate actions)
======================================== */
.ai-loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(139, 255, 34, 0.2);
    border-top-color: #8BFF22;
    border-radius: 50%;
    animation: aiSpin 0.8s linear infinite;
    margin-right: 6px;
}

@keyframes aiSpin {
    to { transform: rotate(360deg); }
}

/* ========================================
   TYPING INDICATOR
======================================== */
.ai-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    align-items: center;
}

.ai-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(139, 255, 34, 0.5);
    animation: aiTypingBounce 1.4s ease-in-out infinite;
}

.ai-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes aiTypingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* ========================================
   UPGRADE BAR
======================================== */
.ai-upgrade-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(139, 255, 34, 0.08), rgba(0, 217, 255, 0.08));
    border: 1px solid rgba(139, 255, 34, 0.2);
    border-radius: 8px;
    margin: 0 12px 8px 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    gap: 8px;
}

.ai-upgrade-btn {
    background: linear-gradient(135deg, #8BFF22, #6bcc1a);
    color: #0F2A2A;
    border: none;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.ai-upgrade-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(139, 255, 34, 0.3);
}

/* ========================================
   UPGRADE MODAL
======================================== */
.ai-upgrade-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10010;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-upgrade-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.ai-upgrade-content {
    position: relative;
    background: linear-gradient(180deg, #0d2626, #0a1f1f);
    border: 1px solid rgba(139, 255, 34, 0.2);
    border-radius: 16px;
    max-width: 700px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: aiPanelSlideIn 0.3s ease-out;
}

.ai-upgrade-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(139, 255, 34, 0.1);
}

.ai-upgrade-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
}

.ai-upgrade-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

.ai-upgrade-close:hover {
    color: #fff;
}

.ai-upgrade-body {
    padding: 20px 24px 24px;
}

.ai-upgrade-body > p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 16px 0;
    font-size: 14px;
}

.ai-plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.ai-plan-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.ai-plan-card:hover {
    border-color: rgba(139, 255, 34, 0.3);
    background: rgba(139, 255, 34, 0.03);
}

.ai-plan-card.current {
    border-color: rgba(139, 255, 34, 0.4);
    background: rgba(139, 255, 34, 0.05);
}

.ai-plan-card.popular {
    border-color: rgba(0, 217, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.1);
}

.ai-plan-popular {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #00d9ff, #0099cc);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 10px;
    white-space: nowrap;
}

.ai-plan-card h4 {
    margin: 8px 0 4px;
    color: #fff;
    font-size: 15px;
}

.ai-plan-price {
    font-size: 22px;
    font-weight: 700;
    color: #8BFF22;
    margin: 8px 0;
}

.ai-plan-card p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin: 8px 0;
    min-height: 50px;
}

.ai-plan-card small {
    display: block;
    color: rgba(255, 255, 255, 0.4);
    font-size: 10px;
    margin-bottom: 12px;
}

.ai-plan-select-btn {
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(139, 255, 34, 0.3);
    background: transparent;
    color: #8BFF22;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-plan-select-btn:hover:not(.disabled) {
    background: rgba(139, 255, 34, 0.15);
    border-color: #8BFF22;
}

.ai-plan-select-btn.disabled {
    opacity: 0.5;
    cursor: default;
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.4);
}

/* ========================================
   PAYWALL OVERLAY
======================================== */
.ai-paywall-overlay {
    position: absolute;
    inset: 0;
    top: 60px; /* below header */
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: safe center;
    background: linear-gradient(180deg, rgba(10, 30, 30, 0.97) 0%, rgba(15, 42, 42, 0.99) 100%);
    backdrop-filter: blur(8px);
    padding: 24px 16px 32px 16px;
    overflow-y: auto;
}

.ai-paywall-content {
    text-align: center;
    max-width: 340px;
    margin: auto 0;
}

.ai-paywall-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: aiPaywallPulse 2s ease-in-out infinite;
}

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

.ai-paywall-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.ai-paywall-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin: 0 0 20px 0;
}

.ai-paywall-plans {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    text-align: left;
}

.ai-paywall-plan {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    transition: all 0.2s;
}

.ai-paywall-plan:hover {
    border-color: rgba(139, 255, 34, 0.2);
    background: rgba(139, 255, 34, 0.03);
}

.ai-paywall-plan.popular {
    border-color: rgba(0, 217, 255, 0.3);
    background: rgba(0, 217, 255, 0.04);
}

.ai-paywall-plan strong {
    color: #ffffff;
    font-size: 0.9rem;
}

.ai-paywall-plan small {
    display: block;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.75rem;
    margin-top: 2px;
}

.ai-paywall-badge {
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 8px;
    background: rgba(0, 217, 255, 0.15);
    color: #00d9ff;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
}

.ai-paywall-cta {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: #8BFF22;
    color: #0F2A2A;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 8px;
}

.ai-paywall-cta:hover {
    background: #7ae61f;
    box-shadow: 0 4px 20px rgba(139, 255, 34, 0.3);
    transform: translateY(-1px);
}

.ai-paywall-cta-secondary {
    display: block;
    width: 100%;
    padding: 10px 20px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-paywall-cta-secondary:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.04);
}

/* Responsive: Stack plan cards on smaller screens */
@media (max-width: 768px) {
    .ai-plans-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ai-plans-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   STREAMING CURSOR
======================================== */
.ai-message-assistant .ai-message-content:not(:empty)::after {
    content: '▊';
    animation: aiCursorBlink 0.6s steps(2, start) infinite;
    color: #8BFF22;
    margin-left: 2px;
    font-weight: 400;
}

.ai-message-assistant.done .ai-message-content::after {
    display: none;
}

@keyframes aiCursorBlink {
    to { visibility: hidden; }
}

/* ========================================
   ONBOARDING TUTORIAL
======================================== */
.ai-tutorial-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    backdrop-filter: blur(2px);
    animation: aiTutorialFadeIn 0.3s ease;
}

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

.ai-tutorial-highlight {
    position: relative;
    z-index: 100001 !important;
    box-shadow: 0 0 0 4px rgba(139, 255, 34, 0.5), 0 0 20px rgba(139, 255, 34, 0.2) !important;
    border-radius: 10px;
    animation: aiTutorialPulse 2s ease-in-out infinite;
}

@keyframes aiTutorialPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(139, 255, 34, 0.5), 0 0 20px rgba(139, 255, 34, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(139, 255, 34, 0.7), 0 0 30px rgba(139, 255, 34, 0.35); }
}

.ai-tutorial-tooltip {
    background: linear-gradient(135deg, #1a2a2a 0%, #0f1f1f 100%);
    border: 1px solid rgba(139, 255, 34, 0.3);
    border-radius: 16px;
    padding: 20px;
    color: #e0e0e0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(139, 255, 34, 0.1);
    z-index: 100002;
    animation: aiTooltipSlide 0.3s ease;
}

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

.ai-tutorial-tooltip.ai-tutorial-pos-center {
    animation: aiTooltipSlide 0.3s ease;
}

.ai-tutorial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ai-tutorial-step-counter {
    font-size: 0.75rem;
    color: #8BFF22;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-tutorial-skip {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.ai-tutorial-skip:hover {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
}

.ai-tutorial-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
}

.ai-tutorial-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 16px 0;
}

.ai-tutorial-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.ai-tutorial-prev,
.ai-tutorial-next {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.ai-tutorial-prev {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-tutorial-prev:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.ai-tutorial-next {
    background: linear-gradient(135deg, #8BFF22, #6bcc1a);
    color: #0a1a0a;
    min-width: 100px;
}

.ai-tutorial-next:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.ai-tutorial-progress {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
}

.ai-tutorial-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.3s;
}

.ai-tutorial-dot.active {
    background: #8BFF22;
    box-shadow: 0 0 6px rgba(139, 255, 34, 0.4);
}

/* ========================================
   PHASE 5 — SECTION DIVIDER
======================================== */
.ai-section-divider {
    padding: 6px 20px 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ai-section-divider::before,
.ai-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 255, 34, 0.2), transparent);
}

.ai-section-label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(139, 255, 34, 0.6);
    white-space: nowrap;
}

/* ========================================
   PHASE 5 — ACTION BUTTONS
======================================== */
.ai-phase5-actions {
    padding-top: 4px !important;
}

.ai-p5-btn {
    border-color: rgba(139, 255, 34, 0.08) !important;
    background: rgba(139, 255, 34, 0.02) !important;
    color: rgba(255, 255, 255, 0.55) !important;
    font-size: 10px !important;
}

.ai-p5-btn:hover {
    border-color: rgba(139, 255, 34, 0.35) !important;
    background: rgba(139, 255, 34, 0.08) !important;
    color: #8BFF22 !important;
    box-shadow: 0 0 12px rgba(139, 255, 34, 0.08);
}

/* ========================================
   PHASE 5 — LANGUAGE BADGES
======================================== */
.ai-lang-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    margin-left: 4px;
    letter-spacing: 0.5px;
}

.ai-system-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    background: rgba(139, 255, 34, 0.1);
    color: #8BFF22;
    margin-left: 4px;
    letter-spacing: 0.5px;
}

/* ========================================
   PHASE 5 — LANGUAGE GRID
======================================== */
.ai-language-grid {
    flex-direction: column !important;
}

.ai-language-grid .ai-apply-btn {
    min-width: 100% !important;
}

.ai-lang-btn {
    border-color: rgba(59, 130, 246, 0.2) !important;
}

.ai-lang-btn:hover {
    border-color: rgba(59, 130, 246, 0.4) !important;
    background: rgba(59, 130, 246, 0.08) !important;
    color: #60a5fa !important;
}

/* ========================================
   PHASE 5 — GENERATED IMAGE
======================================== */
.ai-generated-image-wrapper {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 8px 0;
    max-width: 100%;
}

.ai-generated-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.ai-generated-image:hover {
    transform: scale(1.02);
}

/* ========================================
   PHASE 5 — DANGER BUTTON
======================================== */
.ai-danger-btn {
    border-color: rgba(239, 68, 68, 0.2) !important;
    color: rgba(239, 68, 68, 0.8) !important;
}

.ai-danger-btn:hover {
    border-color: rgba(239, 68, 68, 0.4) !important;
    background: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
}

/* ========================================
   PHASE 3 — SKELETON AGENDA (Step 1)
======================================== */
.ai-skeleton-agenda {
    margin: 4px 0;
}

.ai-skeleton-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.ai-skeleton-badge {
    font-size: 0.7rem;
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.ai-skeleton-meta {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

.ai-skeleton-blocks {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

/* Multi-day day headers in AI chat */
.ai-skeleton-day-header,
.ai-agenda-day-divider {
    font-size: 12px;
    font-weight: 700;
    color: #8BFF22;
    padding: 6px 0 4px;
    margin-top: 8px;
    border-bottom: 1px solid rgba(139, 255, 34, 0.15);
    margin-bottom: 6px;
}

.ai-skeleton-day-header:first-child,
.ai-agenda-day-divider:first-child {
    margin-top: 0;
}

.ai-skeleton-block {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.2s;
}

.ai-skeleton-block:hover {
    border-color: rgba(139, 92, 246, 0.25);
}

.ai-block-order {
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    flex-shrink: 0;
}

.ai-block-content {
    flex: 1;
    min-width: 0;
}

.ai-block-title {
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2px;
}

.ai-block-desc {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.3;
    margin-bottom: 3px;
}

.ai-block-duration {
    font-size: 0.68rem;
    color: rgba(139, 92, 246, 0.7);
    font-weight: 500;
}

/* Block type colors */
.ai-block-type-keynote {
    border-left: 3px solid rgba(251, 191, 36, 0.5);
}

.ai-block-type-session {
    border-left: 3px solid rgba(59, 130, 246, 0.5);
}

.ai-block-type-workshop {
    border-left: 3px solid rgba(16, 185, 129, 0.5);
}

.ai-block-type-break,
.ai-block-type-lunch {
    border-left: 3px solid rgba(156, 163, 175, 0.4);
    background: rgba(255, 255, 255, 0.02);
}

.ai-block-type-networking {
    border-left: 3px solid rgba(236, 72, 153, 0.5);
}

.ai-block-type-panel {
    border-left: 3px solid rgba(168, 85, 247, 0.5);
}

.ai-block-type-closing,
.ai-block-type-registration {
    border-left: 3px solid rgba(107, 114, 128, 0.4);
}

.ai-skeleton-tips {
    margin-bottom: 8px;
}

.ai-skeleton-tip {
    font-size: 0.72rem;
    color: rgba(251, 191, 36, 0.7);
    padding: 3px 0;
    line-height: 1.3;
}

.ai-skeleton-hint {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
    padding: 6px 8px;
    background: rgba(139, 92, 246, 0.06);
    border: 1px dashed rgba(139, 92, 246, 0.2);
    border-radius: 6px;
    margin-bottom: 8px;
}

/* ========================================
   PHASE 3 — FULL AGENDA (Step 2+)
======================================== */
.ai-full-agenda {
    margin: 4px 0;
}

.ai-full-agenda-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.ai-enriched-badge {
    font-size: 0.7rem;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.ai-full-agenda-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.ai-agenda-item {
    display: flex;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-agenda-item:hover {
    border-color: rgba(139, 92, 246, 0.2);
}

.ai-agenda-time {
    min-width: 52px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    font-size: 0.75rem;
    color: rgba(139, 92, 246, 0.8);
}

.ai-agenda-time-end {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.3);
}

.ai-agenda-content {
    flex: 1;
    min-width: 0;
}

.ai-agenda-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.ai-agenda-desc {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
    line-height: 1.3;
}

/* ========================================
   PHASE 4 — TRENDY TITLE ASSISTANT
======================================== */
.ai-trendy-titles {
    margin: 4px 0;
}

.ai-trendy-header {
    margin-bottom: 8px;
}

.ai-trendy-original {
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 8px;
    font-size: 0.78rem;
}

.ai-trendy-label {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
}

.ai-trendy-current {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.ai-trendy-insight {
    font-size: 0.72rem;
    color: rgba(139, 255, 34, 0.8);
    padding: 5px 8px;
    background: rgba(139, 255, 34, 0.06);
    border-radius: 6px;
    border: 1px solid rgba(139, 255, 34, 0.15);
    margin-bottom: 8px;
    line-height: 1.4;
}

.ai-trendy-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    margin-bottom: 10px;
}

.ai-trendy-kw-label {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.35);
    margin-right: 2px;
}

.ai-keyword-badge.trendy {
    background: rgba(249, 115, 22, 0.12) !important;
    color: #fb923c !important;
    border-color: rgba(249, 115, 22, 0.25) !important;
    font-size: 0.65rem;
}

.ai-trendy-variants {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.ai-trendy-variant {
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    transition: border-color 0.2s;
}

.ai-trendy-variant:hover {
    border-color: rgba(249, 115, 22, 0.3);
}

.ai-trendy-variant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.ai-trendy-strategy {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(249, 115, 22, 0.8);
    font-weight: 600;
}

.ai-trendy-score {
    font-size: 0.68rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.ai-trendy-variant-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 4px;
    line-height: 1.3;
}

.ai-trendy-rationale {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.35;
    margin-bottom: 4px;
}

.ai-trendy-signals {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ai-trend-signal {
    font-size: 0.62rem;
    color: rgba(139, 255, 34, 0.65);
    background: rgba(139, 255, 34, 0.06);
    padding: 1px 6px;
    border-radius: 8px;
    border: 1px solid rgba(139, 255, 34, 0.12);
}

.ai-trendy-key-points {
    margin-top: 4px;
}
.ai-trendy-key-point {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    padding: 1px 0;
}
.ai-trendy-seo-kw {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.ai-trendy-actions {
    flex-wrap: wrap;
}

.ai-trendy-actions .ai-apply-btn {
    font-size: 0.68rem !important;
    padding: 4px 8px !important;
}

/* ========================================
   ANALYZE PROMPT (manual trigger)
======================================== */
.ai-analyze-prompt {
    animation: aiAnalyzeSlideIn 0.3s ease-out;
}

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

.ai-analyze-prompt-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(139, 255, 34, 0.05) !important;
    border: 1px solid rgba(139, 255, 34, 0.15) !important;
    border-left: 3px solid rgba(139, 255, 34, 0.4) !important;
    padding: 8px 12px !important;
}

.ai-analyze-prompt-content span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.ai-analyze-prompt-btn {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid rgba(139, 255, 34, 0.4);
    background: rgba(139, 255, 34, 0.12);
    color: #8BFF22;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.ai-analyze-prompt-btn:hover {
    background: rgba(139, 255, 34, 0.25);
    border-color: #8BFF22;
    box-shadow: 0 2px 8px rgba(139, 255, 34, 0.2);
}

.ai-analyze-prompt-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.ai-analyze-triggered {
    opacity: 0.5;
    pointer-events: none;
}

/* ── Phase 5: Date Check Styles ── */
.ai-date-check {
    font-size: 13px;
    line-height: 1.5;
}

.ai-date-check-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 10px;
}
.ai-date-severity-success { background: rgba(46, 204, 113, 0.12); }
.ai-date-severity-low     { background: rgba(241, 196, 15, 0.12); }
.ai-date-severity-medium  { background: rgba(243, 156, 18, 0.12); }
.ai-date-severity-high    { background: rgba(231, 76, 60, 0.12); }

.ai-date-severity-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.ai-date-check-header strong {
    display: block;
    font-size: 14px;
    color: #fff;
}

.ai-date-chosen {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
}

.ai-date-season {
    margin-left: auto;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: capitalize;
    white-space: nowrap;
}
.ai-date-season-high   { background: rgba(231, 76, 60, 0.2); color: #e74c3c; }
.ai-date-season-medium { background: rgba(243, 156, 18, 0.2); color: #f39c12; }
.ai-date-season-low    { background: rgba(46, 204, 113, 0.2); color: #2ecc71; }

/* Tips */
.ai-date-tips {
    margin-bottom: 10px;
}

.ai-date-tip {
    padding: 6px 10px;
    background: rgba(52, 152, 219, 0.08);
    border-left: 2px solid #3498db;
    border-radius: 0 6px 6px 0;
    margin-bottom: 4px;
    font-size: 12px;
    color: rgba(255,255,255,0.8);
}

/* Conflict sections */
.ai-date-conflicts-section {
    margin-bottom: 10px;
}

.ai-date-section-title {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ai-date-conflict-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 4px;
}

.ai-date-conflict-card.ai-date-conflict-location {
    border-left: 2px solid #f39c12;
}

.ai-date-conflict-title {
    font-weight: 500;
    color: #fff;
    margin-bottom: 3px;
    font-size: 13px;
}

.ai-date-conflict-meta {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 2px;
}

.ai-date-conflict-fill {
    font-size: 11px;
    color: #f39c12;
    font-weight: 500;
}

/* Day analysis */
.ai-date-day-analysis {
    margin-bottom: 6px;
}

.ai-date-best-day {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 3px;
    background: rgba(255,255,255,0.03);
}

.ai-date-best-day.ai-date-chosen-day {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.25);
}

.ai-date-day-name {
    font-weight: 600;
    color: #fff;
    min-width: 80px;
    font-size: 12px;
}

.ai-date-day-reason {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    flex: 1;
}

.ai-date-chosen-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    white-space: nowrap;
}

/* ── Phase 6: Features Generator Styles ── */
.ai-features-gen {
    font-size: 13px;
}

.ai-features-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ai-features-header strong {
    font-size: 14px;
    color: #fff;
}

.ai-features-count {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.06);
    padding: 2px 8px;
    border-radius: 10px;
}

.ai-features-summary {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    padding: 6px 10px;
    background: rgba(52, 152, 219, 0.08);
    border-left: 2px solid #3498db;
    border-radius: 0 6px 6px 0;
    margin-bottom: 10px;
}

.ai-features-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.ai-feature-card {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    position: relative;
    transition: background 0.2s;
}

.ai-feature-card:hover {
    background: rgba(255,255,255,0.07);
}

.ai-feature-card.ai-feature-unique {
    border-color: rgba(241, 196, 15, 0.3);
    background: rgba(241, 196, 15, 0.05);
}

.ai-feature-card.ai-feature-applied {
    opacity: 0.5;
    pointer-events: none;
}

.ai-feature-unique-badge {
    position: absolute;
    top: -6px;
    right: 30px;
    font-size: 9px;
    padding: 1px 6px;
    border-radius: 8px;
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

.ai-feature-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.ai-feature-body {
    flex: 1;
    min-width: 0;
}

.ai-feature-title {
    font-weight: 600;
    color: #fff;
    font-size: 13px;
}

.ai-feature-desc {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    margin-top: 1px;
}

.ai-feature-cat {
    font-size: 10px;
    color: rgba(255,255,255,0.35);
    margin-top: 3px;
}

.ai-feature-add-btn {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(139, 255, 34, 0.3);
    background: rgba(139, 255, 34, 0.08);
    color: #8BFF22;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    align-self: center;
}

.ai-feature-add-btn:hover {
    background: rgba(139, 255, 34, 0.2);
    border-color: #8BFF22;
}

.ai-feature-add-btn:disabled {
    opacity: 0.5;
    cursor: default;
    color: #2ecc71;
}

/* ── Phase 6: Pricing Analysis Styles ── */
.ai-pricing {
    font-size: 13px;
    line-height: 1.5;
}

.ai-pricing-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(139, 255, 34, 0.08);
    border-radius: 8px;
    margin-bottom: 10px;
}

.ai-pricing-main {
    flex: 1;
}

.ai-pricing-recommended {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ai-pricing-label {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ai-pricing-value {
    font-size: 22px;
    font-weight: 700;
    color: #8BFF22;
}

.ai-pricing-range {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
}

.ai-pricing-badges {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}

.ai-pricing-confidence {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: capitalize;
}
.ai-pricing-conf-high   { background: rgba(46, 204, 113, 0.15); color: #2ecc71; }
.ai-pricing-conf-medium { background: rgba(241, 196, 15, 0.15); color: #f1c40f; }
.ai-pricing-conf-low    { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }

.ai-pricing-position {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.5);
    text-transform: capitalize;
}

.ai-pricing-reasoning {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    padding: 6px 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    margin-bottom: 10px;
}

.ai-pricing-section-title {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    margin-bottom: 6px;
}

/* Scenarios */
.ai-pricing-scenarios {
    margin-bottom: 10px;
}

.ai-pricing-scenario {
    padding: 8px 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    margin-bottom: 4px;
}

.ai-pricing-scenario.ai-pricing-scenario-rec {
    border-color: rgba(139, 255, 34, 0.25);
    background: rgba(139, 255, 34, 0.05);
}

.ai-pricing-scenario-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.ai-pricing-scenario-head strong {
    color: #fff;
    font-size: 13px;
}

.ai-pricing-sublabel {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}

.ai-pricing-rec-badge {
    margin-left: auto;
    font-size: 10px;
    color: #8BFF22;
}

.ai-pricing-scenario-data {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
}

.ai-pricing-scenario-price {
    font-weight: 600;
    color: #fff;
    min-width: 65px;
}

.ai-pricing-scenario-fill {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    color: rgba(255,255,255,0.5);
    font-size: 11px;
}

.ai-pricing-fill-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.ai-pricing-fill-inner {
    height: 100%;
    background: #8BFF22;
    border-radius: 2px;
    transition: width 0.3s;
}

.ai-pricing-scenario-rev {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    white-space: nowrap;
}

/* Early bird */
.ai-pricing-earlybird {
    margin-bottom: 10px;
}

.ai-pricing-earlybird-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(243, 156, 18, 0.08);
    border: 1px solid rgba(243, 156, 18, 0.2);
    border-radius: 6px;
}

.ai-pricing-earlybird-discount {
    font-size: 16px;
    font-weight: 700;
    color: #f39c12;
    flex-shrink: 0;
}

.ai-pricing-earlybird-content strong {
    color: #f39c12;
}

.ai-pricing-earlybird-reason {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin-top: 3px;
}

/* Market data */
.ai-pricing-market {
    margin-bottom: 10px;
}

.ai-pricing-market-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.ai-pricing-stat {
    display: flex;
    flex-direction: column;
    padding: 6px 10px;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
}

.ai-pricing-stat span {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

/* Price distribution */
.ai-pricing-dist {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ai-pricing-dist-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.ai-pricing-dist-label {
    min-width: 60px;
    color: rgba(255,255,255,0.5);
    text-align: right;
}

.ai-pricing-dist-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}

.ai-pricing-dist-bar div {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #8BFF22);
    border-radius: 3px;
}

.ai-pricing-dist-count {
    min-width: 20px;
    color: rgba(255,255,255,0.4);
    font-size: 10px;
}

/* Tips */
.ai-pricing-tips {
    margin-bottom: 8px;
}

.ai-pricing-tip {
    padding: 5px 10px;
    background: rgba(52, 152, 219, 0.08);
    border-left: 2px solid #3498db;
    border-radius: 0 6px 6px 0;
    margin-bottom: 3px;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

/* Free recommendation */
.ai-pricing-free {
    padding: 8px 10px;
    background: rgba(46, 204, 113, 0.08);
    border: 1px solid rgba(46, 204, 113, 0.2);
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

.ai-pricing-free strong {
    color: #2ecc71;
    display: block;
    margin-bottom: 3px;
}

/* ==========================================
   PHASE 7 — SEO Result Styles
   ========================================== */
/* Main container — JS uses .ai-seo */
.ai-seo {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ai-seo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
/* Score ring container */
.ai-seo-score {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}
.ai-seo-ring {
    width: 48px;
    height: 48px;
    transform: rotate(-90deg);
}
.ai-seo-ring-bg {
    fill: none;
    stroke: rgba(255,255,255,.08);
    stroke-width: 3;
}
.ai-seo-ring-fill {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset .6s ease;
}
.ai-seo-score-num {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
}

/* SEO fields */
.ai-seo-field {
    background: rgba(255,255,255,.04);
    border-radius: 8px;
    padding: 10px 12px;
}
.ai-seo-field-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
/* Field label — used throughout: 📝 Meta Title, 📄 Meta Description, etc. */
.ai-seo-field-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    opacity: .7;
}
/* Character length badge */
.ai-seo-field-len {
    font-size: 10px;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 600;
}
.ai-seo-field-len.ok {
    background: rgba(46,204,113,.15);
    color: #2ecc71;
}
.ai-seo-field-len.warn {
    background: rgba(241,196,15,.15);
    color: #f1c40f;
}
/* Field text preview */
.ai-seo-field-preview {
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}
.ai-seo-title-preview {
    color: #8ab4f8;
    font-weight: 500;
}
.ai-seo-desc-preview {
    opacity: .85;
}

/* Google Preview */
.ai-seo-google-preview {
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    padding: 12px;
    background: rgba(255,255,255,.02);
}
.ai-seo-google-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    opacity: .5;
    margin-bottom: 8px;
    font-weight: 600;
}
.ai-seo-google-title {
    color: #8ab4f8;
    font-size: 15px;
    font-weight: 400;
    margin-bottom: 2px;
    text-decoration: underline;
    text-decoration-color: rgba(138,180,248,.3);
}
.ai-seo-google-url {
    color: #bdc1c6;
    font-size: 12px;
    margin-bottom: 4px;
}
.ai-seo-google-desc {
    color: #9aa0a6;
    font-size: 12px;
    line-height: 1.5;
}

/* Social Preview — JS uses .ai-seo-social */
.ai-seo-social {
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    padding: 12px;
    background: rgba(255,255,255,.02);
}
.ai-seo-social-card {
    margin-top: 8px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 8px;
    background: rgba(255,255,255,.02);
}
.ai-seo-og-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}
.ai-seo-og-desc {
    font-size: 12px;
    opacity: .7;
    line-height: 1.4;
}

/* Slug */
.ai-seo-slug {
    font-size: 12px;
    padding: 6px 10px;
    background: rgba(255,255,255,.04);
    border-radius: 6px;
    font-family: 'SF Mono', 'Cascadia Code', monospace;
    margin-top: 4px;
}

/* Keywords — JS uses .ai-seo-keywords, .ai-seo-kw-list, .ai-seo-kw, .ai-seo-kw-primary */
.ai-seo-keywords {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ai-seo-kw-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.ai-seo-kw {
    background: rgba(255,255,255,.06);
    padding: 2px 9px;
    border-radius: 10px;
    font-size: 11px;
    opacity: .8;
}
.ai-seo-kw.ai-seo-kw-primary {
    background: rgba(52,152,219,.2);
    color: #3498db;
    font-weight: 600;
    opacity: 1;
}

/* Tags — JS uses .ai-seo-tags, .ai-seo-tag-list, .ai-seo-tag */
.ai-seo-tags {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ai-seo-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.ai-seo-tag {
    background: rgba(155,89,182,.15);
    color: #bb8fce;
    padding: 2px 9px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

/* SEO Checklist — JS uses .ai-seo-check-item, .ai-seo-check-pass/warn/fail, .ai-seo-check-detail */
.ai-seo-checklist {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ai-seo-check-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    padding: 4px 0;
}
.ai-seo-check-item > span:first-child {
    font-size: 14px;
    flex-shrink: 0;
}
.ai-seo-check-detail {
    font-size: 11px;
    opacity: .6;
    margin-top: 2px;
}
.ai-seo-check-pass {
    border-left: 2px solid #2ecc71;
    padding-left: 8px;
}
.ai-seo-check-warn {
    border-left: 2px solid #f1c40f;
    padding-left: 8px;
}
.ai-seo-check-fail {
    border-left: 2px solid #e74c3c;
    padding-left: 8px;
}

/* SEO Tips — JS uses .ai-seo-tip */
.ai-seo-tips {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ai-seo-tip {
    font-size: 12px;
    padding: 3px 0;
    opacity: .85;
    line-height: 1.4;
}

/* ==========================================
   PHASE 7 — Predict Attendance Styles
   ========================================== */
/* Main container — JS uses .ai-predict */
.ai-predict {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ai-predict-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.ai-predict-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ai-predict-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    opacity: .5;
    font-weight: 600;
}
.ai-predict-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}
.ai-predict-range {
    font-size: 11px;
    opacity: .5;
    margin-top: 2px;
}
/* Confidence ring */
.ai-predict-confidence {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}
.ai-predict-ring {
    width: 48px;
    height: 48px;
    transform: rotate(-90deg);
}
.ai-predict-conf-label {
    font-size: 9px;
    opacity: .5;
    text-transform: uppercase;
}
/* Fill bar */
.ai-predict-fill {
    background: rgba(255,255,255,.04);
    border-radius: 8px;
    padding: 10px 12px;
}
.ai-predict-fill-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 12px;
    opacity: .7;
}
.ai-predict-fill-bar {
    height: 8px;
    background: rgba(255,255,255,.08);
    border-radius: 4px;
    overflow: hidden;
}
.ai-predict-fill-bar div {
    height: 100%;
    border-radius: 4px;
    transition: width .5s ease;
}
.ai-predict-revenue {
    font-size: 12px;
    padding: 8px 12px;
    background: rgba(46,204,113,.08);
    border-radius: 8px;
    color: #2ecc71;
}
.ai-predict-revenue strong {
    font-weight: 700;
}
/* Section title — used for "Key Factors" and "Recommendations" */
.ai-predict-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    opacity: .7;
    margin-bottom: 4px;
}
/* Factors */
.ai-predict-factors {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ai-predict-factor {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    border-left: 3px solid transparent;
}
.ai-predict-factor-icon {
    font-size: 14px;
    flex-shrink: 0;
}
.ai-predict-factor-desc {
    font-size: 11px;
    opacity: .6;
    margin-top: 2px;
}
.ai-predict-factor-positive {
    background: rgba(46,204,113,.06);
    border-left-color: #2ecc71;
}
.ai-predict-factor-negative {
    background: rgba(231,76,60,.06);
    border-left-color: #e74c3c;
}
.ai-predict-factor-neutral {
    background: rgba(255,255,255,.03);
    border-left-color: rgba(255,255,255,.15);
}
/* Recommendations — JS uses .ai-predict-rec */
.ai-predict-recs {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ai-predict-rec {
    font-size: 12px;
    padding: 3px 0;
    opacity: .85;
    line-height: 1.4;
}

/* ==========================================
   PHASE 7 — A/B Test Result Styles
   ========================================== */
.ai-abtest {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ai-abtest-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.ai-abtest-id {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    opacity: .5;
    font-family: monospace;
}
.ai-abtest-variant {
    background: rgba(255,255,255,.03);
    border-radius: 8px;
    padding: 10px 12px;
    border-left: 3px solid rgba(255,255,255,.1);
    transition: background .2s;
}
.ai-abtest-variant:hover {
    background: rgba(255,255,255,.05);
}
.ai-abtest-control {
    border-left-color: #2ecc71;
    background: rgba(46,204,113,.04);
}
.ai-abtest-variant-head {
    margin-bottom: 6px;
}
.ai-abtest-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.ai-abtest-badge-control {
    background: rgba(46,204,113,.15);
    color: #2ecc71;
}
.ai-abtest-badge-variant {
    background: rgba(52,152,219,.15);
    color: #3498db;
}
.ai-abtest-variant-title {
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
}

/* ==========================================
   PHASE 8 — Toast Notifications
   ========================================== */
.ai-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100010;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.ai-toast {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(20, 25, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    min-width: 240px;
    max-width: 380px;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.ai-toast-show {
    opacity: 1;
    transform: translateX(0);
}
.ai-toast-hide {
    opacity: 0;
    transform: translateX(40px);
}
.ai-toast-icon {
    font-size: 16px;
    flex-shrink: 0;
}
.ai-toast-text {
    flex: 1;
    line-height: 1.4;
}
.ai-toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 16px;
    cursor: pointer;
    padding: 0 2px;
    flex-shrink: 0;
    transition: color 0.2s;
}
.ai-toast-close:hover {
    color: rgba(255, 255, 255, 0.8);
}
.ai-toast-success {
    border-color: rgba(46, 204, 113, 0.2);
}
.ai-toast-error {
    border-color: rgba(231, 76, 60, 0.2);
}
.ai-toast-warning {
    border-color: rgba(241, 196, 15, 0.2);
}
.ai-toast-credits {
    border-color: rgba(155, 89, 182, 0.2);
}

/* ==========================================
   PHASE 8 — Cost Confirmation Popover
   ========================================== */
.ai-cost-confirm {
    background: rgba(20, 25, 30, 0.97);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 10px;
    padding: 10px 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    min-width: 220px;
    max-width: 300px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.ai-cost-confirm-show {
    opacity: 1;
    transform: translateY(0);
}
.ai-cost-confirm-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin-bottom: 10px;
}
.ai-cost-confirm-text strong {
    color: #FFD700;
}
.ai-cost-confirm-actions {
    display: flex;
    gap: 8px;
}
.ai-cost-confirm-yes {
    flex: 1;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(139, 255, 34, 0.3);
    background: rgba(139, 255, 34, 0.1);
    color: #8BFF22;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.ai-cost-confirm-yes:hover {
    background: rgba(139, 255, 34, 0.2);
}
.ai-cost-confirm-no {
    flex: 1;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.ai-cost-confirm-no:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Ticket Tier button */
.ai-apply-btn.tier {
    background: rgba(255, 165, 0, 0.12);
    border-color: rgba(255, 165, 0, 0.3);
    color: #FFA500;
}
.ai-apply-btn.tier:hover {
    background: rgba(255, 165, 0, 0.2);
}

/* Applied state (after AI image is set) */
.ai-apply-btn.applied {
    background: rgba(139, 255, 34, 0.15) !important;
    border-color: rgba(139, 255, 34, 0.5) !important;
    color: #8BFF22 !important;
    cursor: default;
    pointer-events: none;
}

/* AI Generated Image wrapper improvements */
.ai-generated-image-wrapper {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(139, 255, 34, 0.2);
}

.ai-generated-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}
