/* calc/assets/css/calculators/screen_time.css */

:root {
    --accent-cyan: #06B6D4;
    --accent-cyan-light: #ECFEFF;
    --gradient-cyan-card: linear-gradient(135deg, #0891B2 0%, #06B6D4 100%);
    --text-on-cyan: #ffffff;
    
    /* Цвета сегментов жизни */
    --life-sleep: #94A3B8; /* Slate 400 */
    --life-work: #60A5FA;  /* Blue 400 */
    --life-screen: #F43F5E; /* Rose 500 */
    --life-free: #34D399;  /* Emerald 400 */
}

.calc-header { margin-bottom: 32px; }
.subtitle { color: var(--text-secondary); margin-top: 8px; font-size: 16px; }

/* --- Сетка --- */
.calc-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: 1.2fr 0.8fr; } }

/* --- Inputs --- */
.input-group { margin-bottom: 24px; }
.input-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.input-wrapper { position: relative; display: flex; align-items: center; }

.input-wrapper input {
    width: 100%; padding: 14px; padding-right: 50px;
    font-size: 16px; font-weight: 500;
    border: 1px solid #E5E7EB; border-radius: 12px;
    outline: none; transition: all 0.2s;
    font-family: var(--font-main);
}
.input-wrapper input:focus { border-color: var(--accent-cyan); box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1); }
.suffix { position: absolute; right: 16px; color: var(--text-secondary); pointer-events: none; font-size: 14px; }
.helper-text { font-size: 12px; color: var(--text-secondary); margin-top: 6px; line-height: 1.4; }
.row-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.soft-divider-small { border: none; height: 1px; background: #F3F4F6; margin: 24px 0; }

.tip-box-input {
    display: flex; gap: 12px; align-items: flex-start;
    font-size: 13px; line-height: 1.5; color: var(--text-secondary);
    background: #F8FAFC; padding: 12px; border-radius: 12px;
}
.tip-icon { color: var(--accent-cyan); flex-shrink: 0; margin-top: 2px; }

/* --- Карточка результата --- */
.card--cyan { background: var(--gradient-cyan-card); color: var(--text-on-cyan); border: none; }
.card--cyan h2 { color: rgba(255,255,255,0.8); font-size: 14px; text-transform: uppercase; margin-bottom: 8px; letter-spacing: 0.05em; }

.result-value { font-size: 56px; font-weight: 800; line-height: 1; margin: 12px 0; }
.result-sub { font-size: 15px; opacity: 0.9; font-weight: 500; }
.summary-divider { height: 1px; background: rgba(255,255,255,0.2); margin: 24px 0; }

/* --- Killer Feature: Life Bar --- */
.life-bar-wrapper h4 { font-size: 14px; margin-bottom: 12px; font-weight: 600; opacity: 0.95; }

.life-bar {
    display: flex; height: 16px; width: 100%; border-radius: 8px; overflow: hidden;
    background: rgba(0,0,0,0.2); margin-bottom: 16px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}
.life-segment { height: 100%; transition: width 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); }

.seg-sleep { background: var(--life-sleep); }
.seg-work { background: var(--life-work); }
.seg-screen { background: var(--life-screen); position: relative; }
/* Анимация пульсации для красной зоны, чтобы привлечь внимание */
.seg-screen::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shine 2s infinite;
}
@keyframes shine { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

.seg-life { background: var(--life-free); }

.life-legend { font-size: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.l-item { display: flex; align-items: center; opacity: 0.8; }
.active-legend { opacity: 1; font-weight: 700; color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 2px; margin-right: 8px; }
.d-sleep { background: var(--life-sleep); }
.d-work { background: var(--life-work); }
.d-screen { background: var(--life-screen); }
.d-life { background: var(--life-free); }

/* Impact Stats */
.impact-stats {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.15);
}
.impact-item { text-align: center; flex: 1; }
.impact-num { display: block; font-size: 24px; font-weight: 800; line-height: 1.2; }
.impact-label { font-size: 11px; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.05em; }
.impact-divider { width: 1px; height: 30px; background: rgba(255,255,255,0.2); }

/* --- ИНФОРМАЦИОННЫЙ БЛОК --- */
.info-wrapper { padding: 60px 0 60px 0; margin-top: 60px; border-top: 1px solid rgba(0,0,0,0.06); margin-bottom: 20px; }
.info-wrapper .container { max-width: 800px; margin: 0 auto; }

.icon-heading { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; font-size: 24px; font-weight: 800; color: var(--text-primary); line-height: 1.3; }
.small-heading { margin-top: 40px; margin-bottom: 16px; font-size: 20px; }

.header-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.04); flex-shrink: 0; margin-top: -4px; }
.header-icon svg { width: 24px; height: 24px; stroke-width: 2px; }
.small-heading .header-icon { width: 40px; height: 40px; }
.small-heading .header-icon svg { width: 20px; height: 20px; }

/* Цвета иконок */
.cyan-icon svg { color: var(--accent-cyan); }
.blue-icon svg { color: #2563EB; }
.red-icon svg { color: #E11D48; }

.intro-text { font-size: 16px; color: var(--text-secondary); margin-bottom: 32px; line-height: 1.6; }

/* Формулы */
.formulas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 48px; }
.formula-card { background: #fff; border: 1px solid rgba(0,0,0,0.04); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03); border-radius: 24px; padding: 24px; transition: all 0.3s; display: flex; flex-direction: column; }
.formula-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08); }
.formula-header { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.formula-card h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.formula-card p { font-size: 14px; color: var(--text-secondary); margin: 0; line-height: 1.5; font-weight: 500; }
.badge-cyan { background: var(--accent-cyan); color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; display: inline-block; }
.badge-dark { background: #1F2937; color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; display: inline-block; }
.math-expression { background: var(--accent-cyan-light); border: 1px solid #CFFAFE; padding: 12px 16px; border-radius: 12px; font-weight: 700; color: #0891B2; text-align: center; margin-bottom: 16px; font-size: 15px; }

.soft-divider { border: none; height: 1px; background: linear-gradient(90deg, transparent, #E5E7EB, transparent); margin: 48px 0; }
.calc-description p { font-size: 16px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 24px; }
.calc-description strong { color: var(--text-primary); }

/* FAQ Cyan Style */
.faq-cyan-style .faq-item { background: #fff; border: 1px solid #E5E7EB; border-radius: 12px; margin-bottom: 12px; overflow: hidden; transition: all 0.2s ease; }
.faq-cyan-style .faq-item[open] { border-color: var(--accent-cyan); box-shadow: 0 4px 20px rgba(6, 182, 212, 0.15); }
.faq-cyan-style summary.faq-question { padding: 16px 20px; cursor: pointer; font-weight: 600; color: var(--text-primary); list-style: none; position: relative; display: flex; justify-content: space-between; align-items: center; transition: background 0.2s; }
.faq-cyan-style summary.faq-question:hover { background-color: #F9FAFB; }
.faq-cyan-style .faq-item[open] summary.faq-question { color: #0E7490; background: var(--accent-cyan-light); }
.faq-question::after { content: '+'; font-size: 20px; color: var(--text-secondary); font-weight: 400; line-height: 1; }
.faq-question .icon-plus { display: none; }
.faq-cyan-style .faq-item[open] summary.faq-question::after { content: '−'; color: #0E7490; }
.faq-answer { padding: 20px; color: var(--text-secondary); line-height: 1.6; font-size: 15px; }

@media (max-width: 900px) {
    .formulas-grid { grid-template-columns: 1fr; gap: 16px; margin-bottom: 32px; }
    .icon-heading { font-size: 20px; gap: 12px; margin-bottom: 20px; }
    .header-icon { width: 40px; height: 40px; border-radius: 12px; }
    .header-icon svg { width: 20px; height: 20px; }
    .formula-card { padding: 24px; text-align: center; align-items: center; }
    .formula-header { align-items: center; width: 100%; }
    .math-expression { width: 100%; max-width: 300px; margin-left: auto; margin-right: auto; }
    .info-wrapper { margin-top: 40px; padding-top: 40px; }
}