/* calc/assets/css/calculators/prime_checker.css */

:root {
    --bg-soft-card: #FFFFFF;
    --text-soft-main: #0F172A; /* Slate 900 */
    --text-soft-muted: #64748B; /* Slate 500 */
    --accent-prime-green: #10B981;
    --accent-comp-rose: #F43F5E;
    --border-soft: #F1F5F9;
}

/* =========================================
   ОСНОВНАЯ СЕТКА И КАРКАС
   ========================================= */
.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; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: 1.2fr 0.8fr; } }

.calc-inputs { gap: 16px; }
.group-title { font-size: 16px; font-weight: 800; color: #1E293B; margin: 0 0 16px 0; text-transform: uppercase; letter-spacing: 0.05em;}

.input-group { margin-bottom: 16px; }
.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[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

.input-wrapper input {
    width: 100%; padding: 16px 20px; font-size: 18px; font-weight: 700;
    border: 2px solid #E2E8F0; border-radius: 14px;
    outline: none; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit; background: #F8FAFC; color: #0F172A;
}
.input-wrapper input:focus { 
    border-color: #38BDF8; background: #fff;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.15); 
}

.helper-text { font-size: 13px; color: var(--text-secondary); margin-top: 8px; }

.info-alert {
    display: flex; align-items: flex-start; gap: 12px;
    background: #F0FDF4; border: 1px solid #BBF7D0;
    padding: 16px; border-radius: 14px; margin-top: 24px;
    color: #166534; font-size: 14px; line-height: 1.5;
}
.info-alert svg { flex-shrink: 0; color: #22C55E; margin-top: -2px; }

/* =========================================
   ПРАВАЯ КАРТОЧКА (Soft Minimal)
   ========================================= */
.card--soft { 
    background: var(--bg-soft-card); 
    border: 1px solid #E2E8F0; border-radius: 24px;
    /* Мягкая, дорогая тень (Glass/Claymorphism) */
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.08);
    padding: 32px 24px; text-align: center;
    position: relative; overflow: hidden;
    transition: background 0.3s;
}
@media (min-width: 900px) { .sticky-card { position: sticky; top: 24px; } }

/* Бейдж статуса */
.soft-status-badge {
    display: inline-block; padding: 6px 16px; border-radius: 99px;
    font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em;
    background: #F1F5F9; color: #64748B; margin-bottom: 24px; transition: all 0.3s;
}
.badge-prime { background: #D1FAE5; color: #059669; }
.badge-comp { background: #FFE4E6; color: #E11D48; }

.soft-display { margin-bottom: 32px; }
.soft-number { 
    font-size: 56px; font-weight: 900; color: var(--text-soft-main); 
    line-height: 1; letter-spacing: -0.02em; word-break: break-all; transition: color 0.3s;
}
.soft-verdict { font-size: 16px; font-weight: 600; color: var(--text-soft-muted); margin-top: 12px; transition: color 0.3s;}

/* Блок множителей */
.factors-box { 
    background: #F8FAFC; border-radius: 16px; padding: 16px; 
    margin-bottom: 24px; text-align: center; border: 1px dashed #CBD5E1;
}
.factors-title { font-size: 13px; font-weight: 700; color: var(--text-soft-muted); margin-bottom: 8px; text-transform: uppercase; }
.factors-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.factor-chip { 
    background: #fff; border: 1px solid #E2E8F0; color: #0F172A;
    padding: 4px 10px; border-radius: 8px; font-weight: 700; font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.soft-divider { height: 1px; background: var(--border-soft); margin: 0 0 24px 0; }

/* Детали */
.details-list { display: flex; flex-direction: column; gap: 12px;}
.detail-row { display: flex; justify-content: space-between; align-items: center; padding: 0 8px; font-size: 14px; color: var(--text-soft-muted); font-weight: 600;}
.detail-row strong { font-size: 16px; font-weight: 800; color: var(--text-soft-main); cursor: pointer; transition: color 0.2s;}
.detail-row strong:hover { color: #38BDF8; }

.hidden { display: none !important; }

/* Специфичные цвета для карточки при результате */
.card-is-prime { background: #F0FDF4; border-color: #BBF7D0; }
.card-is-prime .soft-number { color: #166534; }
.card-is-prime .soft-verdict { color: #15803D; }

.card-is-comp { background: #FFF1F2; border-color: #FECDD3; }
.card-is-comp .soft-number { color: #BE123C; }
.card-is-comp .soft-verdict { color: #E11D48; }

/* =========================================
   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; }

.pastel-blue-icon svg { color: #38BDF8; }
.pastel-purple-icon svg { color: #A855F7; }

.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; display: flex; flex-direction: column; }
.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-soft-green { background: #D1FAE5; color: #059669; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.badge-soft-blue { background: #E0F2FE; color: #0284C7; 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-ТАБЛИЦА */
.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; color: #0F172A; font-size: 18px; }
.seo-table { width: 100%; border-collapse: collapse; text-align: left; }
.seo-table th { background: #F8FAFC; padding: 12px 16px; font-weight: 700; color: #475569; border-bottom: 2px solid #E2E8F0; }
.seo-table td { padding: 16px; border-bottom: 1px solid #E2E8F0; color: #1E293B; font-weight: 600; font-family: monospace; font-size: 15px;}
.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 */
.faq-section .faq-item { background: #fff; border: 1px solid #E2E8F0; border-radius: 16px; margin-bottom: 12px; overflow: hidden; transition: all 0.2s ease; }
.faq-section .faq-item[open] { border-color: #38BDF8; box-shadow: 0 4px 20px rgba(56, 189, 248, 0.1); }
summary.faq-question { padding: 16px 20px; cursor: pointer; font-weight: 700; 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: #0284C7; background: #F0F9FF; }
.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: #0284C7; }
.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; }
    .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; }
    .seo-table-container { padding: 16px; overflow-x: auto; }
    .seo-table th, .seo-table td { padding: 12px 10px; font-size: 14px; }
}