/* calc/assets/css/calculators/meta_tags.css */

:root {
    --bg-midnight-card: #0F172A; /* Slate 900 */
    --text-midnight-main: #F8FAFC; /* Slate 50 */
    --text-midnight-muted: #94A3B8; /* Slate 400 */
    
    /* Accents */
    --accent-blue: #3B82F6; /* Blue 500 */
    --accent-blue-hover: #2563EB; 
    --serp-link-blue: #8AB4F8; /* Google Dark Mode Link Color */
    --serp-yandex-link: #3388FF; 
    
    /* Indicator Colors */
    --score-good: #10B981; 
    --score-warn: #F59E0B; 
    --score-bad: #EF4444; 
    
    --border-midnight: #1E293B; 
    --shadow-midnight: 0 24px 48px -12px rgba(0, 0, 0, 0.8), 
                       0 0 15px rgba(0, 0, 0, 0.4);
}

.calc-header { margin-bottom: 32px; }
.subtitle { color: var(--text-secondary); margin-top: 8px; }

.calc-grid { 
    display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; 
    width: 100%; box-sizing: border-box; 
}
@media (min-width: 1000px) { .calc-grid { grid-template-columns: 1fr 1fr; } }

.calc-inputs, .calc-results { 
    min-width: 0; max-width: 100%; box-sizing: border-box; overflow: hidden; 
}

.group-title { font-size: 14px; font-weight: 800; color: #1E293B; margin: 0 0 12px 0; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 2px solid #E2E8F0; padding-bottom: 8px;}

/* УТИЛИТЫ */
.hidden { display: none !important; }

/* INPUTS */
.input-group { margin-bottom: 16px; width: 100%; position: relative;}
.input-group label { display: block; font-size: 13px; font-weight: 700; color: #334155; margin-bottom: 6px;}

.calc-input, .calc-textarea {
    width: 100%; padding: 14px 16px; font-size: 15px; line-height: 1.5;
    border: 2px solid #E2E8F0; border-radius: 12px; background: #FFFFFF;
    color: #0F172A; outline: none; transition: all 0.3s;
    box-sizing: border-box; font-family: inherit;
}
.calc-textarea { min-height: 120px; resize: vertical; }
.calc-input:focus, .calc-textarea:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15); }

/* Pixel Progress */
.pixel-counter { font-size: 12px; font-weight: 800; color: #64748B; font-variant-numeric: tabular-nums;}
.progress-bar-bg { width: 100%; height: 4px; background: #E2E8F0; border-radius: 99px; overflow: hidden;}
.progress-bar-fill { height: 100%; width: 0%; transition: width 0.1s linear, background-color 0.3s;}

/* ПРАВАЯ КАРТОЧКА (Midnight SERP) */
.card--midnight-blue { 
    background: var(--bg-midnight-card); 
    color: var(--text-midnight-main); 
    border: 1px solid var(--border-midnight); border-radius: 24px;
    box-shadow: var(--shadow-midnight);
    overflow: hidden; padding: 24px 0; 
    display: flex; flex-direction: column;
    min-width: 0; max-width: 100%; box-sizing: border-box;
}
@media (min-width: 1000px) { .sticky-card { position: sticky; top: 24px; } }

.serp-title { 
    color: var(--text-midnight-muted); margin: 0; 
    font-size: 11px; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase;
}

.serp-toggles { display: flex; background: #1E293B; border-radius: 8px; padding: 4px; }
.toggle-btn {
    background: transparent; border: none; color: #94A3B8; font-size: 11px; font-weight: 700;
    padding: 6px 12px; border-radius: 6px; cursor: pointer; transition: all 0.2s;
}
.toggle-btn.active { background: #334155; color: #F8FAFC; }

.serp-engine-label {
    display: flex; align-items: center; font-size: 12px; font-weight: 600; color: #94A3B8;
    margin: 0 24px 8px; gap: 8px;
}

/* --- GOOGLE SERP PREVIEW --- */
.serp-preview-box {
    background: #202124; /* Google Dark Mode Bg */
    padding: 16px 24px; font-family: arial, sans-serif;
    min-height: 120px; word-break: break-word; overflow: hidden;
}
.serp-url-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 8px;}
.serp-url-wrap img { width: 18px; height: 18px; border-radius: 50%; background: #fff;}
.serp-breadcrumbs { font-size: 14px; color: #BDC1C6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}

.serp-title-link { 
    font-size: 20px; color: var(--serp-link-blue); line-height: 1.3;
    margin-bottom: 4px; cursor: pointer; 
    /* Эмуляция обрезки */
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.serp-title-link:hover { text-decoration: underline; }

.serp-description {
    font-size: 14px; color: #BDC1C6; line-height: 1.58;
    /* Эмуляция обрезки 2 строки */
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* --- YANDEX SERP PREVIEW --- */
.yandex-title { font-size: 18px; margin-bottom: 2px;}
.yandex-url-wrap { margin-bottom: 6px; }
.yandex-url { font-size: 14px; color: #2EE573; display: flex; align-items: center; gap: 4px;}
.yandex-url b { color: #fff; font-weight: 400;}
.yandex-desc { font-size: 14px; color: #A6A9AE; line-height: 1.4;}

/* Mobile View Overrides */
.mobile-view .serp-title-link { font-size: 18px; -webkit-line-clamp: 2; }
.mobile-view .serp-breadcrumbs { font-size: 12px; }
.mobile-view .serp-preview-box { padding: 16px 16px; border-radius: 16px; margin: 0 8px; border: 1px solid #3C4043; background: #171717;}

/* SEO Tips Box */
.seo-tips-box {
    margin: 24px 24px 0; padding: 16px; background: #1E293B; border-radius: 12px;
    border-left: 4px solid var(--accent-blue);
}
.tip-header { font-size: 11px; font-weight: 800; color: #94A3B8; text-transform: uppercase; margin-bottom: 8px;}
.tip-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px;}
.tip-list li { font-size: 13px; color: #F8FAFC; display: flex; align-items: flex-start; gap: 8px; line-height: 1.4;}
.tip-list li svg { flex-shrink: 0; margin-top: 2px;}
.tip-list li.good svg { color: var(--score-good); }
.tip-list li.warn svg { color: var(--score-warn); }
.tip-list li.bad svg { color: var(--score-bad); }

/* Buttons */
.download-action-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px; background: var(--accent-blue); color: #FFFFFF;
    font-size: 14px; font-weight: 700; border-radius: 12px; border: none; cursor: pointer;
    transition: all 0.3s ease; box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
}
.download-action-btn:hover { background: var(--accent-blue-hover); transform: translateY(-2px); box-shadow: 0 12px 25px rgba(59, 130, 246, 0.3); }

.secondary-action-btn {
    background: #F1F5F9; color: #475569; border: none; border-radius: 12px;
    font-size: 13px; font-weight: 700; cursor: pointer; transition: background 0.2s;
}
.secondary-action-btn:hover { background: #E2E8F0; color: #0F172A; }

/* SEO ИНФОБЛОКИ И ТАБЛИЦЫ */
.info-wrapper { padding: 60px 0; margin-top: 60px; border-top: 1px solid rgba(0,0,0,0.06); margin-bottom: 20px; }
.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; }
.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; }
.blue-icon svg { color: var(--accent-blue); }
.slate-icon svg { color: #64748B; }
.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; width: 100%; box-sizing: border-box;}
.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; display: flex; flex-direction: column; min-width: 0; max-width: 100%; box-sizing: border-box;}
.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; }
.badge-blue { background: #EFF6FF; color: #2563EB; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.badge-emerald { background: #ECFDF5; color: #10B981; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.formula-card p { font-size: 14px; color: var(--text-secondary); margin: 0; line-height: 1.5; font-weight: 500; }
.soft-divider { border: none; height: 1px; background: linear-gradient(90deg, transparent, #E2E8F0, transparent); margin: 48px 0; }
.faq-section .faq-item { background: #fff; border: 1px solid #E2E8F0; border-radius: 12px; margin-bottom: 12px; overflow: hidden; transition: all 0.2s ease; }
.faq-section .faq-item[open] { border-color: var(--accent-blue); box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
summary.faq-question { padding: 16px 20px; cursor: pointer; font-weight: 600; color: var(--text-primary); list-style: none; display: flex; justify-content: space-between; align-items: center; transition: background 0.2s; }
summary.faq-question:hover { background-color: #F8FAFC; }
.faq-section .faq-item[open] summary.faq-question { color: #2563EB; background: #EFF6FF; }
.faq-question::after { content: '+'; font-size: 20px; color: var(--text-secondary); font-weight: 400; line-height: 1; }
.faq-question .icon-plus { display: none; }
.faq-section .faq-item[open] summary.faq-question::after { content: '−'; color: #2563EB; }
.faq-answer, .faq-item div[itemprop="text"] { 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; }
    .action-buttons { flex-direction: column; }
    .secondary-action-btn { padding: 14px; }
}