/* Light Modern UI - kinzed_web
   New light color palette, refined spacing, accessible contrast.
   Preserves the card hover expand effect and card-actions behavior.
   File: static/stock/stock.light.css
*/


:root {
    /* Primary palette */
    --primary: #2563eb;        /* blue-600 */
    --primary-600: #1d4ed8;
    --primary-300: #93c5fd;
    background: var(--bg-surface);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);

    --accent: #06b6d4;        /* cyan-500 */
    --success: #059669;
    --danger: #dc2626;

    gap: 16px;
    --bg-app: #f8fafc;        /* very light */
    --bg-surface: #ffffff;    /* cards */
    --bg-muted: #f1f5f9;      /* subtle surfaces */

    /* Text */
    --text-primary: #0f172a;  /* slate-900 */
    line-height: 1.1;
    --text-secondary: #475569;/* slate-600 */
    --text-muted: #64748b;    /* slate-500 */
.change {
    font-weight: 600;
    font-size: 1.1rem;
}

.timestamp {
    color: var(--text-muted);
    font-size: 0.875rem;
}
    /* Border & shadow */
    --border: #e6edf3;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 12px;
    font-size: 0.9rem;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    --shadow-lg: 0 30px 60px rgba(16,24,40,0.08);

    /* Radius */
    display: flex;
    flex-direction: column;
    gap: 4px;
html, body { height: 100%; }

.market-data-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.market-data-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-app);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    padding: 24px;
}

/* App container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: transparent; /* pages are made of stacked surfaces */
}

/* Header - light, subtle */
.header {
    background: linear-gradient(180deg, rgba(37,99,235,0.06), rgba(255,255,255,0.0));
    padding: 40px 28px;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    margin: 0;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header p {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Search */
.search-section {
    padding: 18px 12px 28px 12px;
    margin-bottom: 20px;
}

.search-form {
    display: flex;
    gap: 12px;
    max-width: 640px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-weight: 500;
    transition: box-shadow 0.18s ease, transform 0.12s ease;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 6px 18px rgba(37,99,235,0.08);
    border-color: var(--primary-300);
    transform: translateY(-1px);
}

.search-button {
    padding: 12px 20px;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--primary), var(--primary-600));
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.search-button:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Price section */
.price-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.price-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.current-price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
}

.change { font-weight: 700; color: var(--text-secondary); }

.market-data {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 12px;
    font-size: 0.9rem;
}

.market-data-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 6px 4px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

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

.market-data-label {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: none;
}

.market-data-value {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
}

/* Chart container */
.chart-container {
    min-height: 360px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    border-radius: var(--radius-md);
    padding: 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

/* Fundamental section */
.section-container { margin-top: 28px; padding: 0 0 28px 0; }
.section-title { text-align: center; font-weight: 800; color: var(--text-primary); margin-bottom: 20px; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.info-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 18px;
    position: relative;
    overflow: visible;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s cubic-bezier(0.2,0.9,0.2,1), box-shadow 0.22s ease, border-color 0.22s ease;
}

/* KEEP: hover expand effect - minor lift and stronger shadow */
.info-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-lg);
    border-color: rgba(37,99,235,0.12);
}

/* top accent bar */
.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.28s ease;
}
.info-card:hover::before { transform: scaleX(1); }

.card-actions {
    position: absolute;
    top: 14px;
    right: 14px;
    display: none;
    gap: 8px;
    z-index: 12;
}

.info-card:hover .card-actions { display: flex; }

.action-button {
    width: 38px; height: 38px; border-radius: 999px; border: none;
    display:flex; align-items:center; justify-content:center; cursor:pointer;
    background: rgba(255,255,255,0.9); color: var(--text-primary);
    box-shadow: 0 6px 14px rgba(16,24,40,0.06);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.action-button:hover { transform: scale(1.08); box-shadow: var(--shadow-md); }

.info-button { background: var(--primary-300); color: white; }
.chart-button { background: var(--success); color: white; }

/* metric explanation (hidden by default) */
.metric-explanation {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.28s ease, opacity 0.28s ease, padding 0.18s ease;
    background: linear-gradient(180deg, #f8fdff, #fbfeff);
    border-left: 3px solid var(--primary);
    margin-top: 12px;
    padding: 0 12px;
    border-radius: 6px;
    color: var(--text-secondary);
}
.metric-explanation.show {
    max-height: 480px; /* generous */
    opacity: 1;
    padding: 12px;
}

.info-label { font-size: 0.75rem; color: var(--text-secondary); font-weight: 700; margin-bottom: 8px; }
.info-value { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); }

/* Footer */
.footer { text-align:center; padding: 28px 0; color: var(--text-muted); font-size: 0.9rem; }
.footer a { color: var(--primary); text-decoration: none; font-weight: 600; }
.footer a:hover { text-decoration: underline; }

/* Error */
.error { max-width: 680px; margin: 48px auto; background: var(--bg-surface); padding: 28px; border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.error h1 { color: var(--danger); font-size: 1.75rem; margin-bottom: 12px; }
.error p, .error-detail { color: var(--text-secondary); }

/* Responsive tweaks */
@media (max-width: 1024px) { .price-section { grid-template-columns: 1fr; } .chart-container { min-height: 320px; } }
@media (max-width: 520px) { .search-form { flex-direction: column; } .search-button { width: 100%; } }
