/**
 * Landoro AI Quote Assistant Styles
 * Matches Landoro design system
 */

/* ===== AI SUGGESTIONS PANEL ===== */
.ai-suggestions-panel {
    display: none;
    margin-top: 12px;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.05), rgba(20, 184, 166, 0.02));
    border: 1px solid rgba(20, 184, 166, 0.2);
    border-radius: 12px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.ai-suggestions-panel.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Header */
.ai-suggestions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(20, 184, 166, 0.08));
    border-bottom: 1px solid rgba(20, 184, 166, 0.15);
}

.ai-suggestions-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ld-teal, #14B8A6);
}

.ai-suggestions-title svg {
    opacity: 0.8;
}

/* Quality Score */
.ai-quality-score {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-quality-score .score-label {
    font-size: 11px;
    color: var(--ld-text-secondary, #94A3B8);
    font-weight: 500;
}

.ai-quality-score .score-bar {
    width: 60px;
    height: 6px;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.ai-quality-score .score-fill {
    height: 100%;
    background: linear-gradient(90deg, #F59E0B, #FBBF24);
    border-radius: 3px;
    transition: width 0.5s ease, background 0.3s ease;
}

.ai-quality-score .score-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--ld-text-primary, #E2E8F0);
    min-width: 32px;
}

/* Content */
.ai-suggestions-content {
    padding: 14px 16px;
    min-height: 60px;
}

/* Loading State */
.ai-suggestions-panel.loading .ai-loading {
    display: flex;
}

.ai-suggestions-panel.loading .ai-suggestions-list,
.ai-suggestions-panel.loading .ai-good-points {
    display: none;
}

.ai-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    color: var(--ld-text-secondary, #94A3B8);
    font-size: 13px;
}

.ai-loading .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(20, 184, 166, 0.2);
    border-top-color: var(--ld-teal, #14B8A6);
    border-radius: 50%;
    animation: ai-spin 0.8s linear infinite;
}

@keyframes ai-spin {
    to { transform: rotate(360deg); }
}

/* Suggestions List */
.ai-suggestions-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-suggestions-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
    font-size: 13px;
    color: var(--ld-text-primary, #E2E8F0);
    line-height: 1.5;
}

.ai-suggestions-list li svg {
    flex-shrink: 0;
    color: #F59E0B;
    margin-top: 2px;
}

.ai-suggestions-list li span {
    flex: 1;
}

/* Success Message */
.ai-success-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 8px;
    color: #10B981;
    font-size: 13px;
    font-weight: 500;
}

.ai-success-message svg {
    flex-shrink: 0;
}

/* Error Message */
.ai-error-message {
    padding: 12px 14px;
    background: rgba(148, 163, 184, 0.1);
    border-radius: 8px;
    color: var(--ld-text-secondary, #94A3B8);
    font-size: 12px;
    line-height: 1.5;
}

/* Good Points */
.ai-good-points {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(20, 184, 166, 0.1);
}

.ai-good-points:empty {
    display: none;
}

.good-points-title {
    font-size: 12px;
    font-weight: 600;
    color: #10B981;
    margin-bottom: 4px;
}

.good-points-list {
    font-size: 12px;
    color: var(--ld-text-secondary, #94A3B8);
    line-height: 1.5;
}

/* Footer */
.ai-suggestions-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(20, 184, 166, 0.05);
    border-top: 1px solid rgba(20, 184, 166, 0.1);
}

.ai-suggestions-footer small {
    font-size: 11px;
    color: var(--ld-text-secondary, #94A3B8);
}

.ai-dismiss-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 6px;
    color: var(--ld-text-secondary, #94A3B8);
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-dismiss-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #EF4444;
}

/* ===== LIGHT MODE ADJUSTMENTS ===== */
[data-theme="light"] .ai-suggestions-panel {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.06), rgba(20, 184, 166, 0.02));
    border-color: rgba(20, 184, 166, 0.25);
}

[data-theme="light"] .ai-suggestions-header {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(20, 184, 166, 0.06));
}

[data-theme="light"] .ai-suggestions-list li {
    background: rgba(245, 158, 11, 0.06);
    color: #334155;
}

[data-theme="light"] .ai-quality-score .score-value {
    color: #334155;
}

[data-theme="light"] .ai-success-message {
    background: rgba(16, 185, 129, 0.08);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .ai-suggestions-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .ai-quality-score {
        width: 100%;
    }
    
    .ai-quality-score .score-bar {
        flex: 1;
    }
}

/* ===== ANIMATION ENHANCEMENTS ===== */
.ai-suggestions-list li {
    animation: ai-slide-in 0.3s ease forwards;
    opacity: 0;
}

.ai-suggestions-list li:nth-child(1) { animation-delay: 0.1s; }
.ai-suggestions-list li:nth-child(2) { animation-delay: 0.2s; }
.ai-suggestions-list li:nth-child(3) { animation-delay: 0.3s; }
.ai-suggestions-list li:nth-child(4) { animation-delay: 0.4s; }

@keyframes ai-slide-in {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ai-success-message {
    animation: ai-pop-in 0.4s ease forwards;
}

@keyframes ai-pop-in {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    70% {
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
