/* calc/assets/css/calculators/jpg_to_ico.css */

:root {
    --bg-slate-card: #0F172A; /* Deep Slate 900 */
    --text-slate-main: #F8FAFC; /* Slate 50 */
    --text-slate-muted: #94A3B8; /* Slate 400 */
    
    /* Accents: Cyber Mint */
    --accent-mint: #10B981; /* Emerald 500 */
    --accent-mint-hover: #059669; /* Emerald 600 */
    --accent-mint-glow: rgba(16, 185, 129, 0.2);
    
    --border-slate: #1E293B; /* Slate 800 */
    --shadow-slate: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 
                    0 0 15px rgba(0, 0, 0, 0.2);
}

/* =========================================
   ОСНОВНАЯ СЕТКА И КАРКАС
   ========================================= */
.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 #F1F5F9; 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: #F1F5F9; outline: none; transition: all 0.3s;
    font-family: inherit; color: #0F172A; appearance: none; cursor: pointer;
}
.calc-select:focus { 
    background: #fff; border-color: var(--accent-mint); 
    box-shadow: 0 0 0 4px var(--accent-mint-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-mint); background: #D1FAE5;
}
.dropzone-content { display: flex; flex-direction: column; align-items: center; gap: 12px; pointer-events: none;}
.drop-icon { color: var(--accent-mint); transition: transform 0.3s;}
.dropzone-area:hover .drop-icon { transform: translateY(-5px); }
.drop-title { font-size: 16px; font-weight: 700; color: #0F172A; }
.drop-desc { font-size: 13px; color: #475569; }

.info-alert {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 16px; border-radius: 12px; margin-top: 24px;
    font-size: 13px; line-height: 1.5; border: 1px solid;
}
.info-alert svg { flex-shrink: 0; margin-top: -2px; }
.hidden { display: none !important; }

/* =========================================
   ПРАВАЯ КАРТОЧКА (ТЕМНАЯ ТЕМА)
   ========================================= */
.card--cyber-mint { 
    background: var(--bg-slate-card); 
    color: var(--text-slate-main); 
    border: 1px solid var(--border-slate); border-radius: 24px;
    box-shadow: var(--shadow-slate);
    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; } }

.mint-title { 
    color: var(--accent-mint); 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-slate-muted); gap: 16px; text-align: center;
    font-size: 14px; font-weight: 500; flex: 1;
}
.empty-state svg { color: #334155; }

/* File List */
.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; align-items: center; justify-content: space-between;
    background: #1E293B; border: 1px solid #334155; 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-mint); animation: processingBar 1s infinite linear;
}
@keyframes processingBar { 0% { left: -30%; } 100% { left: 100%; } }

.file-thumb {
    width: 48px; height: 48px; border-radius: 8px; background: #0F172A;
    object-fit: cover; border: 1px solid #334155; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; color: var(--text-slate-muted); font-size: 10px; font-weight: 700;
    background-image: linear-gradient(45deg, #1E293B 25%, transparent 25%, transparent 75%, #1E293B 75%, #1E293B), linear-gradient(45deg, #1E293B 25%, transparent 25%, transparent 75%, #1E293B 75%, #1E293B);
    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-slate-main);
    display: block; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
    margin-bottom: 4px;
}
.file-meta { font-size: 11px; color: var(--text-slate-muted); display: flex; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta .status.done { color: var(--accent-mint); font-weight: 600; }
.file-meta .status.wait { color: #CBD5E1; font-weight: 600; }
.file-meta .status.error { color: #EF4444; 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: #334155; color: var(--text-slate-main);
    text-decoration: none; transition: all 0.2s;
}
.btn-dl-single:hover { background: var(--accent-mint); color: #0F172A; }
.btn-dl-single.disabled { background: #1E293B; color: #475569; 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-slate-main); margin-bottom: 8px;}
.progress-bar-bg { width: 100%; height: 6px; background: #334155; border-radius: 99px; overflow: hidden;}
.progress-bar-fill { height: 100%; background: var(--accent-mint); width: 0%; transition: width 0.3s ease;}

/* Buttons Display */
.mint-display { 
    display: flex; flex-direction: column;
    padding: 20px 24px; gap: 12px; background: #0F172A; border-top: 1px solid #1E293B;
    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-mint); 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(16, 185, 129, 0.2);
}
.download-action-btn:hover:not(:disabled) { background: var(--accent-mint-hover); transform: translateY(-2px); box-shadow: 0 12px 25px rgba(16, 185, 129, 0.3); }
.download-action-btn:disabled { background: #334155; color: #64748B; box-shadow: none; transform: none; cursor: not-allowed; }

.secondary-action-btn {
    background: transparent; color: var(--text-slate-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; }

.error-msg {
    margin: 0 24px 24px; background: #450A0A; color: #FCA5A5;
    padding: 16px; border-radius: 12px; font-size: 14px; font-weight: 700;
    border: 1px solid #7F1D1D; 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; }

.mint-icon svg { color: var(--accent-mint); }
.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-mint { background: #ECFDF5; color: #047857; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.badge-slate { background: #F1F5F9; color: #334155; 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 #E5E5EA; 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; }
.seo-table td { padding: 16px; border-bottom: 1px solid #E2E8F0; font-weight: 500; }
.seo-table tr:last-child td { border-bottom: none; }
.soft-divider { border: none; height: 1px; background: linear-gradient(90deg, transparent, #E5E5EA, transparent); margin: 48px 0; }

/* FAQ */
.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-mint); 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: #F0FDF4; }
.faq-section .faq-item[open] summary.faq-question { color: #047857; background: #F0FDF4; }
.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: #047857; }
.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; }
}