/* calc/assets/css/calculators/money_code.css */

:root {
    /* Premium Wealth Palette */
    --bg-wealth-card: #064E3B; /* Emerald 900 */
    --bg-wealth-gradient: linear-gradient(135deg, #064E3B 0%, #022C22 100%);
    
    --text-wealth-main: #FBBF24; /* Amber 400 (Gold) */
    --text-wealth-light: #ECFDF5; /* Emerald 50 */
    --text-wealth-muted: #6EE7B7; /* Emerald 300 */
    
    --accent-gold: #F59E0B; /* Amber 500 */
    --accent-gold-glow: rgba(251, 191, 36, 0.25);
    
    --border-wealth: #047857; /* Emerald 600 */
}

.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 6px 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; }

/* ИНПУТ ДАТЫ */
.input-group { width: 100%; font-size: 14px; font-weight: 700; color: #3F3F46;}
.date-input {
    width: 100%; padding: 16px; font-size: 18px; font-weight: 700;
    border: 2px solid #E2E8F0; border-radius: 12px;
    background: #F8FAFC; outline: none; transition: all 0.3s;
    font-family: inherit; color: #0F172A; box-sizing: border-box; cursor: pointer; text-align: center; letter-spacing: 2px;
}
.date-input:focus { border-color: #059669; box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.15); background: #FFF;}

.info-alert {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 16px; border-radius: 12px; font-size: 13px; line-height: 1.5; border: 1px solid;
}
.info-alert svg { flex-shrink: 0; margin-top: -2px; }


/* ========================================================
   ПРАВЫЙ БЛОК (PREMIUM WEALTH - ИЗУМРУД И ЗОЛОТО)
   ======================================================== */
#result-card.card--premium-wealth { 
    background: var(--bg-wealth-gradient) !important; 
    color: var(--text-wealth-light) !important; 
    border: 1px solid var(--border-wealth) !important; 
    border-radius: 24px !important;
    box-shadow: 0 20px 40px -10px rgba(6, 78, 59, 0.5) !important;
    overflow: hidden !important; 
    padding: 32px 24px !important; 
    display: flex !important; 
    flex-direction: column !important;
    align-items: center !important;
    box-sizing: border-box !important;
    isolation: isolate !important; 
    -webkit-appearance: none !important;
    outline: none !important;
}
#result-card.card--premium-wealth::before, 
#result-card.card--premium-wealth::after { display: none !important; content: none !important; background: transparent !important;}

@media (min-width: 900px) { .sticky-card { position: sticky; top: 24px; } }

.wealth-title { 
    color: var(--text-wealth-muted); margin: 0 0 24px 0; 
    font-size: 12px; text-align: center; 
    font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase;
}

/* VIP БАНКОВСКАЯ КАРТА */
.vip-credit-card {
    position: relative; width: 100%; max-width: 320px; aspect-ratio: 1.586 / 1;
    background: linear-gradient(135deg, #111827 0%, #000000 100%);
    border: 1px solid rgba(251, 191, 36, 0.3); border-radius: 16px;
    padding: 24px; display: flex; flex-direction: column; justify-content: space-between;
    box-shadow: 0 16px 30px rgba(0,0,0,0.6), inset 0 1px 1px rgba(255,255,255,0.1);
    overflow: hidden; margin-bottom: 24px; box-sizing: border-box;
}
/* Блики на карте */
.vip-credit-card::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(to bottom right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.05) 40%, rgba(255,255,255,0) 50%);
    transform: rotate(30deg); pointer-events: none;
}

.card-chip { margin-bottom: 16px; }
.card-code-display {
    font-size: 36px; font-weight: 900; color: var(--text-wealth-main);
    letter-spacing: 8px; font-variant-numeric: tabular-nums; text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    font-family: monospace; text-align: center;
}
.card-footer { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 16px;}
.card-label { font-size: 10px; color: #9CA3AF; letter-spacing: 2px;}
.card-symbol { font-size: 20px; color: var(--text-wealth-main); line-height: 1;}

/* Пересекающиеся круги (Стиль Mastercard) */
.circle { position: absolute; bottom: 20px; width: 32px; height: 32px; border-radius: 50%; opacity: 0.6;}
.c-left { right: 40px; background: #EF4444; }
.c-right { right: 24px; background: #F59E0B; }

/* АНТИ-КОД */
.anti-code-box {
    display: flex; align-items: center; gap: 12px; background: rgba(0,0,0,0.2);
    border: 1px solid rgba(248, 113, 113, 0.3); border-radius: 12px; padding: 12px 16px;
    width: 100%; box-sizing: border-box; margin-bottom: 24px;
}
.ac-icon { font-size: 20px; }
.ac-text { display: flex; align-items: center; justify-content: space-between; flex: 1;}
.ac-label { font-size: 13px; font-weight: 600; color: #FCA5A5;}
.ac-val { font-size: 18px; font-weight: 900; color: #FECACA; letter-spacing: 2px;}

/* ПЛАНЕТА ПОКРОВИТЕЛЬ */
.patron-box {
    width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 20px;
    box-sizing: border-box;
}
.patron-header { font-size: 11px; font-weight: 800; color: var(--text-wealth-muted); text-transform: uppercase; margin-bottom: 4px;}
.patron-name { font-size: 24px; font-weight: 900; color: var(--text-wealth-main); margin-bottom: 12px; text-shadow: 0 0 16px var(--accent-gold-glow);}
.patron-desc { font-size: 13px; color: var(--text-wealth-light); line-height: 1.5; margin-bottom: 16px; opacity: 0.9;}

.patron-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;}
.p-tag { font-size: 11px; padding: 4px 10px; background: rgba(0,0,0,0.3); border-radius: 99px; color: #A7F3D0;}
.p-tag strong { color: #FFF; font-weight: 700;}


/* ========================================================
   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: #059669; }
.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-emerald { background: #D1FAE5; color: #047857; 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: #059669; 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: #047857; background: #D1FAE5; }
.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) {
    .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--premium-wealth { border-radius: 16px !important; padding: 24px 16px !important; margin-top: 16px !important;}
    
    .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; }
    
    .card-code-display { font-size: 30px; letter-spacing: 6px; }
    .patron-name { font-size: 20px; }
}