/* dashboard_enhanced.css
 * AI analysis styles – matched to Football Tips Pro theme
 * (black background, neon green accents)
 */

/* ===== AI ANALYSIS WRAPPER – FULL WIDTH UNDER CARD ===== */
.ai-analysis-wrapper {
    margin-top: 14px;
    width: 100%;
}

/* main analysis panel */
.ai-analysis-result {
    background: var(--bg-2);
    border-radius: 10px;
    border: 1px solid rgba(203, 254, 28, 0.4);
    padding: 18px 20px;
    box-shadow: 0 1px 14px rgba(0, 0, 0, 0.35);
    display: none; /* shown after AI finishes */
}

/* slim neon header bar */
.ai-analysis-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #CBFE1C 0%, #5A7501 100%);
    padding: 8px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
    color: #0B0E13;
}

.ai-analysis-bar span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ===== ANALYZE BUTTON (under card) ===== */
.btn-analyze-ai {
    width: 100%;
    height: 52px;
    line-height: 52px;
    font-family: "Chakra Petch", sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    background: linear-gradient(90deg, #CBFE1C 0%, #5A7501 100%);
    color: #0B0E13;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-analyze-ai:hover:not(:disabled) {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.btn-analyze-ai:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* analyzing / analyzed states */
.btn-analyze-ai.analyzing {
    background: linear-gradient(90deg, #FFC107 0%, #FF9800 100%);
    cursor: wait;
}

.btn-analyze-ai.analyzed {
    background: linear-gradient(90deg, #28A745 0%, #20C997 100%);
}

/* ===== INNER CONTENT ===== */
.ai-analysis-content {
    background: #0B0E13;
    border-radius: 8px;
    padding: 16px 18px;
}

/* header row: AI confidence + verdict */
.analysis-header {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.confidence-badge,
.verdict-badge {
    flex: 1;
    min-width: 150px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    background: #12151B;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.badge-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.6px;
    color: #ABABAB;
}

.badge-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--theme);
}

/* confidence state accents */
.confidence-high   { border-color: #28A745; }
.confidence-medium { border-color: #FFC107; }
.confidence-low    { border-color: #FF3B3B; }

/* verdict states */
.verdict-strong  { border-color: #17A2B8; }
.verdict-risky   { border-color: #FFC107; }
.verdict-avoid   { border-color: #FF3B3B; }

/* ===== TEXT SECTIONS ===== */
.analysis-section {
    margin-bottom: 14px;
}

.analysis-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 6px;
}

.section-text {
    font-size: 13px;
    line-height: 1.7;
    color: #ABABAB;
}

.summary-text {
    background: #12151B;
    padding: 12px 14px;
    border-radius: 6px;
    border-left: 3px solid var(--theme);
}

/* ===== KEY FACTORS LIST ===== */
.factors-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.factor-item {
    font-size: 13px;
    line-height: 1.6;
    color: #ABABAB;
    background: #12151B;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 6px;
    border-left: 3px solid var(--theme);
}

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

.factor-item::before {
    content: "▸";
    margin-right: 6px;
    color: var(--theme);
}

.ai-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    color: var(--white);
}

.spinner-small {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid rgba(203, 254, 28, 0.2);
    border-top-color: var(--theme);
    animation: spin 1s linear infinite;
}

.ai-error {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-radius: 6px;
    background: #3B1014;
    color: #FFB2B2;
    font-size: 13px;
}

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

@media (max-width: 768px) {
    .ai-analysis-result {
        padding: 14px 12px;
    }

    .ai-analysis-content {
        padding: 14px;
    }
}
/* Analyze with AI button */
.btn-analyze-ai {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--theme);           /* your neon green */
    border: 1px solid var(--theme);
    border-radius: 999px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    color: #000;                        /* readable on green */
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-bottom: 6px;
}

.btn-analyze-ai:hover {
    background: #d9ff4e;
    border-color: #d9ff4e;
    transform: translateY(-1px);
}

.btn-analyze-ai.analyzing {
    background: transparent;
    border-color: #ffc107;
    color: #ffc107;
    cursor: wait;
}

.btn-analyze-ai.analyzed {
    background: rgba(203, 254, 28, 0.15);
    border-color: #CBFE1C;
}

/* View Performance / View Log button */
.btn-view-log {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    margin-bottom: 6px;
    background: transparent;
    border: 1px solid rgba(203, 254, 28, 0.3);
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 13px;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-view-log:hover {
    border-color: var(--theme);
    background: rgba(203, 254, 28, 0.08);
}
