/* calc/assets/css/calculators/rune_day.css */

:root {
    /* Nordic Stone Palette */
    --bg-rune-card: #0F172A; /* Slate 900 */
    --text-rune-main: #F8FAFC; /* Slate 50 */
    --text-rune-muted: #94A3B8; /* Slate 400 */
    
    --accent-gold: #D97706; /* Amber 600 */
    --accent-gold-light: #FBBF24; /* Amber 300 */
    --accent-gold-glow: rgba(217, 119, 6, 0.3);
    
    --border-rune: #1E293B; /* Slate 800 */
}

.calc-header { margin-bottom: 32px; }
.subtitle { color: var(--text-secondary); margin-top: 8px; }

/* СИММЕТРИЧНАЯ СЕТКА 50/50 */
.calc-grid { 
    display: grid !important; 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 !important; } 
}

.calc-inputs, .calc-results { 
    min-width: 0 !important; max-width: 100% !important; box-sizing: border-box !important; overflow: hidden !important; 
}

/* ЗАЩИТА ОТ БЕЛЫХ УГЛОВ КАРТОЧКИ CMS */
.calc-results { background: transparent !important; border: none !important; }

.group-title { 
    font-size: 14px; font-weight: 800; color: #171717; margin: 0 0 8px 0; 
    text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 2px solid #E2E8F0; padding-bottom: 8px;
}
.input-hint { font-size: 12px; color: #64748B; margin-bottom: 16px; line-height: 1.4; }

/* ФОКУС (РАДИОКНОПКИ) */
.focus-selector { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px;}
.focus-card { cursor: pointer; }
.focus-card input { display: none; }
.f-content {
    display: flex; align-items: center; gap: 14px; padding: 12px 16px;
    background: #F8FAFC; border: 2px solid #E2E8F0; border-radius: 12px;
    transition: all 0.2s;
}
.focus-card:hover .f-content { border-color: #CBD5E1; background: #FFF; }
.focus-card input:checked + .f-content {
    border-color: var(--accent-gold); background: #FFFBEB;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.1);
}
.f-icon { font-size: 20px; line-height: 1;}
.f-name { font-size: 14px; font-weight: 800; color: #1E293B; transition: color 0.2s;}
.focus-card input:checked + .f-content .f-name { color: #92400E; }

/* КНОПКА БРОСКА (Ядерный фикс отступов) */
.rune-action-box {
    background: #F1F5F9; border-radius: 16px; padding: 32px 20px; text-align: center; border: 1px solid #E2E8F0;
}
.action-desc { 
    font-size: 13px !important; 
    color: #475569 !important; 
    margin: 0 0 24px 0 !important; /* Железобетонный отступ вниз */
    font-style: italic !important; 
    line-height: 1.5 !important; 
    display: block !important;
}
.btn-nordic {
    margin-top: 24px !important; /* Страховка: отталкиваем саму кнопку вниз */
    width: 100%; background: #0F172A; color: #FFF; border: none; padding: 16px;
    border-radius: 12px; font-size: 15px; font-weight: 800; letter-spacing: 0.1em;
    text-transform: uppercase; cursor: pointer; transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.4);
    position: relative; overflow: hidden;
    display: block !important; /* Чтобы margin-top точно сработал */
}
.btn-nordic::after {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent, rgba(217, 119, 6, 0.2), transparent);
    transform: rotate(45deg); transition: all 0.3s; opacity: 0;
}
.btn-nordic:hover { background: #1E293B; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(15, 23, 42, 0.6); color: var(--accent-gold-light);}
.btn-nordic:hover::after { opacity: 1; transform: rotate(45deg) translate(50%, 50%); }

/* ========================================================
   ПРАВЫЙ БЛОК (NORDIC STONE)
   ======================================================== */
#result-card.card--nordic-stone { 
    background-color: var(--bg-rune-card) !important; 
    background-image: radial-gradient(circle at center, #1E293B 0%, #0F172A 100%) !important;
    color: var(--text-rune-main) !important; 
    border: 2px solid var(--border-rune) !important; 
    border-radius: 24px !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.05) !important;
    overflow: hidden !important; 
    padding: 40px 24px !important; 
    display: flex !important; 
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    isolation: isolate !important; 
    -webkit-appearance: none !important;
    outline: none !important;
    min-height: 400px;
}
#result-card.card--nordic-stone::before, 
#result-card.card--nordic-stone::after { display: none !important; content: none !important; background: transparent !important;}

@media (min-width: 900px) { .sticky-card { position: sticky; top: 24px; } }

.hidden { display: none !important; }

/* СОСТОЯНИЯ */
.rune-idle, .rune-casting { text-align: center; color: var(--text-rune-muted); }
.idle-symbol { font-size: 64px; opacity: 0.1; margin-bottom: 16px; }
.rune-idle p { font-size: 14px; font-weight: 500; font-style: italic; letter-spacing: 0.05em;}

.casting-spinner {
    width: 48px; height: 48px; border: 3px solid rgba(217, 119, 6, 0.2);
    border-top-color: var(--accent-gold); border-radius: 50%;
    animation: spin 1s linear infinite; margin: 0 auto 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* РЕЗУЛЬТАТ РУНЫ */
.rune-result { 
    display: flex; flex-direction: column; align-items: center; text-align: center; 
    animation: fadeIn 0.8s ease-out; width: 100%;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.rune-symbol-wrap {
    width: 100px; height: 120px; background: #020617; border: 2px solid #334155;
    border-radius: 16px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8), inset 0 0 20px rgba(217, 119, 6, 0.1);
    margin-bottom: 20px;
}
.r-sym { 
    font-size: 64px; color: var(--accent-gold-light); line-height: 1;
    text-shadow: 0 0 20px var(--accent-gold-glow); transition: transform 0.6s ease;
}
.r-sym.reversed { transform: rotate(180deg); color: #94A3B8; text-shadow: none;}

.r-name { font-size: 24px; font-weight: 900; color: #F8FAFC; margin: 0 0 8px 0; letter-spacing: 0.05em;}
.r-position { font-size: 12px; font-weight: 700; color: var(--accent-gold); text-transform: uppercase; letter-spacing: 0.1em; background: rgba(217, 119, 6, 0.1); padding: 4px 12px; border-radius: 99px;}
.r-position.rev-pos { color: #94A3B8; background: rgba(148, 163, 184, 0.1); }

.r-divider { margin: 24px 0; opacity: 0.5; }

.r-advice-box { background: rgba(15, 23, 42, 0.5); padding: 20px; border-radius: 16px; border: 1px solid #1E293B; width: 100%; box-sizing: border-box;}
.r-advice-lbl { display: block; font-size: 11px; color: #64748B; text-transform: uppercase; font-weight: 800; margin-bottom: 8px; letter-spacing: 0.05em;}
.r-advice-text { font-size: 15px; color: #E2E8F0; line-height: 1.6; margin: 0;}

.disclaimer-text { font-size: 11px; color: #475569; text-align: center; line-height: 1.5; margin-top: auto;}


/* ========================================================
   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; }
.gold-icon svg { color: var(--accent-gold); }
.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-gold { background: #FEF3C7; color: #B45309; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.badge-dark { 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; }

.soft-divider { border: none; height: 1px; background: linear-gradient(90deg, transparent, #E2E8F0, transparent); margin: 48px 0; }

.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); width: 100%; box-sizing: border-box; overflow: hidden; }
.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; }

.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-gold); 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: #B45309; background: #FEF3C7; }
.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: #B45309; }
.faq-answer, .faq-item div[itemprop="text"] { padding: 20px; color: var(--text-secondary); line-height: 1.6; font-size: 15px; }


/* ========================================================
   ИСТИННАЯ МОБИЛЬНАЯ АДАПТАЦИЯ (ДВУХУРОВНЕВАЯ)
   ======================================================== */
@media (max-width: 900px) {
    .calc-grid { display: flex !important; flex-direction: column !important; gap: 16px !important; }
    .formulas-grid { grid-template-columns: 1fr !important; gap: 16px !important; margin-bottom: 32px !important; }
    
    #result-card.card--nordic-stone { border-radius: 16px !important; padding: 32px 16px !important; margin-top: 16px !important; min-height: auto;}
    
    .seo-table-container { padding: 16px !important; width: 100% !important; box-sizing: border-box !important;}
    .seo-table { display: block !important; width: 100% !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch !important; }
    .seo-table thead, .seo-table tbody { display: table !important; width: 100% !important; min-width: 500px !important; }
    .seo-table th, .seo-table td { padding: 12px !important; font-size: 13px !important; white-space: normal !important; }
}

@media (max-width: 480px) {
    .icon-heading { font-size: 18px !important; gap: 12px !important; word-break: break-word !important; overflow-wrap: break-word !important; }
    .header-icon { width: 36px !important; height: 36px !important; flex-shrink: 0 !important; }
    .header-icon svg { width: 20px !important; height: 20px !important; }
    
    .r-name { font-size: 20px; }
}