/* ===== analysis.css — Stock Analysis Modal Styles ===== */

/* Grid: 2 columns on desktop, 1 on mobile */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

@media (max-width: 640px) {
    .analysis-grid {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.analysis-card {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, box-shadow 0.2s;
    backdrop-filter: blur(4px);
}

.analysis-card:hover {
    border-color: rgba(99, 179, 237, 0.4);
    box-shadow: 0 0 24px rgba(99, 179, 237, 0.08);
    transform: translateY(-2px);
}

/* Card title */
.analysis-card-title {
    font-size: 13px;
    letter-spacing: 0.04em;
    color: #94a3b8;
    margin-bottom: 14px;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 10px;
}

/* Stat rows */
.analysis-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.analysis-stat-row:last-child {
    border-bottom: none;
}

/* Labels & values */
.analysis-label {
    font-size: 12.5px;
    color: #94a3b8;
    flex-shrink: 0;
}

.analysis-val {
    font-size: 14px;
    font-weight: 700;
    color: #f1f5f9;
    text-align: right;
}

/* Valuation color coding */
.analysis-val.cheap      { color: #4ade80; }
.analysis-val.reasonable { color: #fbbf24; }
.analysis-val.expensive  { color: #f87171; }

/* MA deviation tag */
.ma-tag {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.06);
    white-space: nowrap;
}

/* Progress bar (for shareholding %) */
.progress-bar-bg {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    margin-top: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* AI Summary block */
.analysis-summary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(99, 179, 237, 0.25);
    border-radius: 14px;
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.75;
    color: #cbd5e1;
    margin-top: 4px;
    position: relative;
    overflow: hidden;
}

.analysis-summary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Button */
.btn-analyze {
    transition: background 0.2s, color 0.2s;
}

.btn-analyze:hover {
    background: rgba(96, 165, 250, 0.12) !important;
    color: #93c5fd !important;
}

/* Spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.analysis-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 48px 0;
    color: #94a3b8;
    font-size: 14px;
}

.analysis-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(99, 179, 237, 0.2);
    border-top-color: #63b3ed;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Trend badge for revenue */
.rev-up   { color: #ef4444; }
.rev-down { color: #10b981; }

/* Section subtitle label */
.analysis-section-label {
    font-size: 11px;
    color: #64748b;
    margin: 10px 0 6px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
