/* calc/assets/css/calculators/word_counter.css */

:root {
    --bg-obsidian-card: #0B1120; 
    --text-obsidian-main: #F8FAFC; 
    --text-obsidian-muted: #94A3B8; 
    
    --accent-teal: #14B8A6; 
    --accent-teal-hover: #0D9488; 
    --accent-teal-glow: rgba(20, 184, 166, 0.2);
    
    --border-obsidian: #1E293B; 
    --shadow-obsidian: 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: 900px) { .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;}

/* LIVE TEXTAREA */
.input-group { margin-bottom: 16px; width: 100%; }
.calc-textarea {
    width: 100%; min-height: 200px; padding: 16px; font-size: 15px; line-height: 1.6;
    border: 2px solid #E2E8F0; border-radius: 12px; background: #FFFFFF;
    color: #0F172A; resize: vertical; outline: none; transition: all 0.3s;
    box-sizing: border-box;
}
.calc-textarea:focus { border-color: var(--accent-teal); box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1); }
.small-textarea { min-height: 80px; font-size: 13px; color: #475569;}

/* ОБЛАКО СТОП-СЛОВ (НОВОЕ) */
.tag-cloud {
    background: #FFF1F2; border: 1px solid #FECDD3; border-radius: 12px;
    padding: 16px; margin-bottom: 16px;
}
.tag-cloud-header { font-size: 12px; font-weight: 700; color: #BE123C; margin-bottom: 12px; text-transform: uppercase;}
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.stopword-tag {
    display: inline-flex; align-items: center; background: #FFE4E6; color: #E11D48;
    padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; border: 1px solid #FDA4AF;
}
.tag-count {
    background: #E11D48; color: #FFF; font-size: 10px; font-weight: 800;
    padding: 2px 6px; border-radius: 4px; margin-left: 6px;
}
.hidden { display: none !important; }

/* STATS DASHBOARD */
.stats-dashboard {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px;
}
@media (min-width: 480px) { .stats-dashboard { grid-template-columns: repeat(4, 1fr); } }

.stat-box {
    background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 12px;
    padding: 16px 12px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: transform 0.2s;
}
.stat-box:hover { transform: translateY(-2px); border-color: var(--accent-teal); }
.stat-label { font-size: 11px; font-weight: 700; color: #64748B; text-transform: uppercase; margin-bottom: 4px; text-align: center;}
.stat-value { font-size: 24px; font-weight: 800; color: #0F172A; }

/* TOGGLE SWITCH */
.settings-panel { background: #F8FAFC; border: 1px solid #E2E8F0; padding: 16px; border-radius: 12px; }
.toggle-switch { display: flex; align-items: center; cursor: pointer; gap: 12px; }
.toggle-switch input { display: none; }
.toggle-slider {
    position: relative; width: 44px; height: 24px; background-color: #CBD5E1;
    border-radius: 34px; transition: .3s; flex-shrink: 0;
}
.toggle-slider:before {
    position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px;
    background-color: white; border-radius: 50%; transition: .3s;
}
.toggle-switch input:checked + .toggle-slider { background-color: var(--accent-teal); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); }
.toggle-label { font-size: 13px; font-weight: 600; color: #1E293B; }

/* DROPZONE СТИЛИ */
.dropzone-area {
    border: 2px dashed #94A3B8; border-radius: 16px; background: #F8FAFC;
    padding: 40px 20px; text-align: center; cursor: pointer;
    transition: all 0.3s ease; margin-top: 8px;
}
.dropzone-area:hover, .dropzone-area.drag-over {
    border-color: var(--accent-teal); background: #F0FDFA;
}
.dropzone-content { display: flex; flex-direction: column; align-items: center; gap: 12px; pointer-events: none;}
.drop-icon { color: var(--accent-teal); transition: transform 0.3s;}
.dropzone-area:hover .drop-icon { transform: translateY(-5px); }
.drop-title { font-size: 16px; font-weight: 700; color: #1E293B; }
.drop-desc { font-size: 13px; color: #64748B; }

/* ПРАВАЯ КАРТОЧКА (Obsidian Dark) */
.card--obsidian-teal { 
    background: var(--bg-obsidian-card); 
    color: var(--text-obsidian-main); 
    border: 1px solid var(--border-obsidian); border-radius: 24px;
    box-shadow: var(--shadow-obsidian);
    overflow: hidden; padding: 32px 0 0 0; 
    display: flex; flex-direction: column; max-height: 650px;
    min-width: 0; max-width: 100%; box-sizing: border-box;
}
@media (min-width: 900px) { .sticky-card { position: sticky; top: 24px; } }

.teal-title { 
    color: var(--accent-teal); margin: 0 24px 16px; 
    font-size: 12px; text-align: center; 
    font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase;
}

.empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 60px 24px; color: var(--text-obsidian-muted); gap: 16px; text-align: center;
    font-size: 14px; font-weight: 500; flex: 1;
}
.empty-state svg { color: #334155; }

.file-list-container {
    flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 24px 20px;
    scrollbar-width: thin; scrollbar-color: #334155 transparent;
    min-width: 0; max-width: 100%; box-sizing: border-box;
}
.file-list-container::-webkit-scrollbar { width: 6px; }
.file-list-container::-webkit-scrollbar-thumb { background-color: #334155; border-radius: 10px; }

.file-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }

.file-item {
    display: flex; flex-direction: column;
    background: #1E293B; border: 1px solid #334155; border-radius: 12px;
    padding: 12px; gap: 8px; transition: transform 0.2s; position: relative; overflow: hidden;
    min-width: 0; max-width: 100%; box-sizing: border-box;
}
.file-item-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; }

.file-thumb {
    width: 40px; height: 40px; border-radius: 8px; background: #0F172A;
    border: 1px solid #334155; flex-shrink: 0; display: flex; align-items: center; justify-content: center; 
    color: var(--text-obsidian-muted); font-size: 10px; font-weight: 700; text-transform: uppercase;
}

.file-info { display: flex; flex-direction: column; flex: 1; overflow: hidden; min-width: 0; width: 100%; }
.file-name { 
    font-size: 13px; font-weight: 700; color: var(--text-obsidian-main);
    display: block; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
    margin-bottom: 2px;
}

.file-stats-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    background: #0F172A; padding: 8px; border-radius: 8px; border: 1px solid #1E293B;
}
.f-stat { display: flex; flex-direction: column; align-items: center; }
.f-lbl { font-size: 9px; color: #64748B; text-transform: uppercase; }
.f-val { font-size: 13px; font-weight: 700; color: #E2E8F0; }
.f-val.highlight { color: var(--accent-teal); }

.status-badge { font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 6px; }
.status-badge.wait { background: #334155; color: #94A3B8; }
.status-badge.done { background: rgba(20, 184, 166, 0.1); color: var(--accent-teal); border: 1px solid var(--accent-teal); }
.status-badge.error { background: #450A0A; color: #FCA5A5; }

.obsidian-display { 
    display: flex; flex-direction: column;
    padding: 20px 24px; gap: 12px; background: #0B1120; border-top: 1px solid #1E293B;
    min-width: 0; max-width: 100%; box-sizing: border-box;
}

.progress-container { margin-bottom: 8px; }
.progress-info { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--text-obsidian-main); margin-bottom: 8px;}
.progress-bar-bg { width: 100%; height: 6px; background: #1E293B; border-radius: 99px; overflow: hidden;}
.progress-bar-fill { height: 100%; background: var(--accent-teal); width: 0%; transition: width 0.2s ease;}

.download-action-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 16px; background: var(--accent-teal); color: #0F172A;
    font-size: 15px; font-weight: 700; border-radius: 14px; border: none; cursor: pointer;
    transition: all 0.3s ease; box-shadow: 0 8px 20px rgba(20, 184, 166, 0.2);
}
.download-action-btn:hover:not(:disabled) { background: var(--accent-teal-hover); transform: translateY(-2px); box-shadow: 0 12px 25px rgba(20, 184, 166, 0.3); }
.download-action-btn:disabled { background: #1E293B; color: #64748B; box-shadow: none; transform: none; cursor: not-allowed; }

.secondary-action-btn {
    background: transparent; color: var(--text-obsidian-muted); border: none;
    font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline;
    transition: color 0.2s; padding: 4px;
}
.secondary-action-btn:hover { color: #EF4444; }

/* 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; }
.teal-icon svg { color: var(--accent-teal); }
.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-teal { background: #F0FDFA; color: #0D9488; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.badge-obsidian { background: #F1F5F9; color: #1E293B; 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; }
.seo-table-container { background: #fff; border: 1px solid #E2E8F0; border-radius: 16px; padding: 24px; margin-bottom: 40px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); }
.seo-table-container h3 { margin-top: 0; margin-bottom: 20px; font-size: 18px; }
.seo-table { width: 100%; border-collapse: collapse; text-align: left; }
.seo-table th { background: #F8FAFC; padding: 12px 16px; font-weight: 700; border-bottom: 2px solid #E2E8F0; color: #475569;}
.seo-table td { padding: 16px; border-bottom: 1px solid #E2E8F0; font-weight: 500; color: #0F172A;}
.seo-table tr:last-child td { border-bottom: none; }
.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-teal); 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: #0D9488; background: #F0FDFA; }
.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: #0D9488; }
.faq-answer, .faq-item div[itemprop="text"] { padding: 20px; color: var(--text-secondary); line-height: 1.6; font-size: 15px; }
@media (max-width: 900px) {
    .row-2-col { grid-template-columns: 1fr; }
    .formulas-grid { grid-template-columns: 1fr; gap: 16px; margin-bottom: 32px; }
    .seo-table-container { padding: 16px; overflow-x: auto; }
    .seo-table th, .seo-table td { padding: 12px 10px; font-size: 14px; }
}