/* calc/assets/css/calculators/svg_to_png.css */

:root {
    --bg-emerald-card: #FDFBF7; /* Soft Sand/Warm Beige */
    --text-emerald-main: #134E4A; /* Deep Forest/Emerald Dark */
    --text-emerald-muted: #52525B; /* Zinc 600 */
    
    /* Accents: Emerald & Sand */
    --accent-emerald: #10B981; /* Brilliant Emerald */
    --accent-sand: #F59E0B; /* Warm Amber */
    --accent-emerald-glow: rgba(16, 185, 129, 0.15);
    
    --border-emerald: #D1FAE5; /* Emerald 100 */
    --shadow-emerald: 0 20px 40px -10px rgba(16, 185, 129, 0.1), 
                      0 0 15px rgba(0, 0, 0, 0.02);
}

/* =========================================
   ОСНОВНАЯ СЕТКА И КАРКАС
   ========================================= */
.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: var(--text-emerald-main); margin: 0 0 12px 0; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 2px solid #F4F4F5; padding-bottom: 8px;}

.input-group { margin-bottom: 16px; }
.input-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-primary); transition: color 0.3s;}

.input-wrapper { position: relative; display: flex; align-items: center; width: 100%; }

.calc-select {
    width: 100%; padding: 14px 16px; font-size: 15px; font-weight: 600;
    border: 2px solid transparent; border-radius: 12px;
    background: #F4F4F5; outline: none; transition: all 0.3s;
    font-family: inherit; color: var(--text-emerald-main); appearance: none; cursor: pointer;
}
.calc-select:focus { 
    background: #fff; border-color: var(--accent-emerald); 
    box-shadow: 0 0 0 4px var(--accent-emerald-glow); 
}

.row-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* DROPZONE СТИЛИ */
.dropzone-area {
    border: 2px dashed #A7F3D0; border-radius: 16px; background: #ECFDF5;
    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-emerald); background: #D1FAE5;
}
.dropzone-content { display: flex; flex-direction: column; align-items: center; gap: 12px; pointer-events: none;}
.drop-icon { color: var(--accent-emerald); transition: transform 0.3s;}
.dropzone-area:hover .drop-icon { transform: translateY(-5px); }
.drop-title { font-size: 16px; font-weight: 700; color: var(--text-emerald-main); }
.drop-desc { font-size: 13px; color: var(--text-emerald-muted); }

.info-alert {
    display: flex; align-items: flex-start; gap: 12px;
    background: #FFFBEB; border: 1px solid #FEF3C7;
    padding: 16px; border-radius: 12px; margin-top: 24px;
    color: #D97706; font-size: 13px; line-height: 1.5;
}
.info-alert svg { flex-shrink: 0; color: var(--accent-sand); margin-top: -2px; }
.hidden { display: none !important; }

/* ПРАВАЯ КАРТОЧКА (Emerald & Sand) */
.card--emerald-sand { 
    background: var(--bg-emerald-card); 
    color: var(--text-emerald-main); 
    border: 1px solid var(--border-emerald); border-radius: 24px;
    box-shadow: var(--shadow-emerald);
    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; } }

.emerald-title { 
    color: var(--accent-emerald); 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-emerald-muted); gap: 16px; text-align: center;
    font-size: 14px; font-weight: 500; flex: 1;
}
.empty-state svg { color: #A7F3D0; }

/* File List */
.file-list-container {
    flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 24px 20px;
    scrollbar-width: thin; scrollbar-color: var(--border-emerald) 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: var(--border-emerald); border-radius: 10px; }

.file-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }

.file-item {
    display: flex; align-items: center; justify-content: space-between;
    background: #FFFFFF; border: 1px solid var(--border-emerald); border-radius: 12px;
    padding: 10px; gap: 12px; transition: transform 0.2s; position: relative; overflow: hidden;
    min-width: 0; max-width: 100%; box-sizing: border-box;
}

.file-item.processing::before {
    content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: 30%;
    background: var(--accent-emerald); animation: processingBar 1s infinite linear;
}
@keyframes processingBar { 0% { left: -30%; } 100% { left: 100%; } }

.file-thumb {
    width: 48px; height: 48px; border-radius: 8px; background: #ECFDF5;
    object-fit: contain; padding: 4px; border: 1px solid #A7F3D0; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; color: #047857; font-size: 10px; font-weight: 700;
    /* Шахматка прозрачности */
    background-image: linear-gradient(45deg, #E4E4E7 25%, transparent 25%, transparent 75%, #E4E4E7 75%, #E4E4E7), linear-gradient(45deg, #E4E4E7 25%, transparent 25%, transparent 75%, #E4E4E7 75%, #E4E4E7);
    background-size: 10px 10px; background-position: 0 0, 5px 5px;
}

/* ЗАЩИТА ТЕКСТА ОТ ВЫЛЕТАНИЯ */
.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-emerald-main);
    display: block; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
    margin-bottom: 4px;
}
.file-meta { font-size: 11px; color: var(--text-emerald-muted); display: flex; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta .status.done { color: var(--accent-emerald); font-weight: 600; }
.file-meta .status.wait { color: var(--accent-sand); font-weight: 600; }
.file-meta .status.error { color: #E11D48; font-weight: 600; }

.file-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-dl-single {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px; background: #D1FAE5; color: var(--accent-emerald);
    text-decoration: none; transition: all 0.2s;
}
.btn-dl-single:hover { background: var(--accent-emerald); color: #fff; }
.btn-dl-single.disabled { background: #F4F4F5; color: #A1A1AA; cursor: not-allowed; pointer-events: none;}

/* Global Progress Bar */
.progress-container { margin-bottom: 16px; }
.progress-info { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--text-emerald-main); margin-bottom: 8px;}
.progress-bar-bg { width: 100%; height: 6px; background: #D1FAE5; border-radius: 99px; overflow: hidden;}
.progress-bar-fill { height: 100%; background: var(--accent-emerald); width: 0%; transition: width 0.3s ease;}

/* Buttons Display */
.emerald-display { 
    display: flex; flex-direction: column;
    padding: 20px 24px; gap: 12px; background: #FFFFFF; border-top: 1px solid var(--border-emerald);
    min-width: 0; max-width: 100%; box-sizing: border-box;
}

.download-action-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 16px; background: var(--accent-emerald); color: #FFFFFF;
    font-size: 15px; font-weight: 700; border-radius: 14px; border: none; cursor: pointer;
    transition: all 0.3s ease; box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}
.download-action-btn:hover:not(:disabled) { background: #059669; transform: translateY(-2px); box-shadow: 0 12px 25px rgba(16, 185, 129, 0.4); }
.download-action-btn:disabled { background: #E4E4E7; color: #A1A1AA; box-shadow: none; transform: none; cursor: not-allowed; }

.secondary-action-btn {
    background: transparent; color: var(--text-emerald-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: #E11D48; }

.error-msg {
    margin: 0 24px 24px; background: #FEF2F2; color: #E11D48;
    padding: 16px; border-radius: 12px; font-size: 14px; font-weight: 700;
    border: 1px solid #FECDD3; text-align: center;
}

/* 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; }
.emerald-icon svg { color: var(--accent-emerald); }
.slate-icon svg { color: var(--text-emerald-muted); }
.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-emerald { background: #ECFDF5; color: #047857; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.badge-sand { background: #FFFBEB; color: #B45309; 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 #E4E4E7; 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; color: var(--text-emerald-main); font-size: 18px; }
.seo-table { width: 100%; border-collapse: collapse; text-align: left; }
.seo-table th { background: #FDFBF7; padding: 12px 16px; font-weight: 700; color: var(--text-emerald-muted); border-bottom: 2px solid #E4E4E7; }
.seo-table td { padding: 16px; border-bottom: 1px solid #E4E4E7; color: var(--text-emerald-main); font-weight: 500; }
.seo-table tr:last-child td { border-bottom: none; }
.soft-divider { border: none; height: 1px; background: linear-gradient(90deg, transparent, #E4E4E7, transparent); margin: 48px 0; }

/* FAQ */
.faq-section .faq-item { background: #fff; border: 1px solid #E4E4E7; border-radius: 12px; margin-bottom: 12px; overflow: hidden; transition: all 0.2s ease; }
.faq-section .faq-item[open] { border-color: var(--accent-emerald); box-shadow: var(--shadow-emerald); }
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: #ECFDF5; }
.faq-section .faq-item[open] summary.faq-question { color: var(--accent-emerald); background: #ECFDF5; }
.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: var(--accent-emerald); }
.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; }
}