/* calc/assets/css/calculators/business_days.css */

:root {
    --accent-violet: #7C3AED; /* Violet 600 */
    --accent-violet-light: #F3E8FF; /* Violet 100 */
    --gradient-violet-card: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    --text-on-violet: #ffffff;
}

.calc-header { margin-bottom: 32px; }
.subtitle { color: var(--text-secondary); margin-top: 8px; font-size: 16px; }

/* Grid */
.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; } }

/* Tabs */
.mode-switcher-tabs {
    display: flex; background: #F3F4F6; padding: 4px; border-radius: 12px; margin-bottom: 24px;
}
.mode-tab {
    flex: 1; padding: 12px; border: none; background: transparent;
    color: var(--text-secondary); font-weight: 600; font-size: 14px;
    border-radius: 8px; cursor: pointer; transition: all 0.2s;
}
.mode-tab.active { background: #fff; color: var(--accent-violet); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

/* Inputs */
.input-block-title {
    font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--text-secondary); margin-bottom: 16px; font-weight: 700;
}

.input-group { margin-bottom: 24px; }
.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-wrapper input {
    width: 100%; padding: 14px; padding-right: 14px;
    font-size: 16px; font-weight: 500;
    border: 1px solid #E5E7EB; border-radius: 12px;
    outline: none; transition: all 0.2s;
    font-family: var(--font-main);
    background: #fff;
}
.input-wrapper input:focus { 
    border-color: var(--accent-violet); 
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1); 
}
.suffix { position: absolute; right: 16px; color: var(--text-secondary); pointer-events: none; }
.helper-text { font-size: 12px; color: var(--text-secondary); margin-top: 6px; }

/* Custom Select (v3.3) */
.select-wrapper { position: relative; background: #fff; }
.select-wrapper select {
    width: 100%; padding: 14px; padding-right: 40px;
    font-size: 16px; font-weight: 500;
    border: 1px solid #E5E7EB; border-radius: 12px;
    outline: none; transition: all 0.2s;
    font-family: var(--font-main);
    background: transparent;
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    cursor: pointer; color: var(--text-primary);
}
.select-wrapper select:focus { border-color: var(--accent-violet); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1); }
.select-arrow {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    pointer-events: none; color: var(--text-secondary); display: flex;
}
.select-wrapper:hover .select-arrow { color: var(--accent-violet); }

/* Result Card */
.card--violet { background: var(--gradient-violet-card); color: var(--text-on-violet); border: none; }
.card--violet h2 { color: rgba(255,255,255,0.8); font-size: 14px; text-transform: uppercase; margin-bottom: 8px; letter-spacing: 0.05em; }

.result-main { display: flex; align-items: baseline; gap: 8px; margin: 12px 0; }
.result-value { font-size: 42px; font-weight: 800; line-height: 1; }
.result-sub { font-size: 15px; opacity: 0.9; font-weight: 500; }

.summary-divider { height: 1px; background: rgba(255,255,255,0.2); margin: 24px 0; }

/* Timeline Strip */
.time-strip-wrapper h4 { font-size: 13px; margin-bottom: 10px; font-weight: 600; opacity: 0.9; }
.time-strip {
    display: flex; height: 24px; width: 100%; border-radius: 6px; overflow: hidden;
    background: rgba(0,0,0,0.2); margin-bottom: 12px;
}
.ts-block { flex: 1; height: 100%; position: relative; }
.ts-block.ts-w { background: #fff; opacity: 0.9; }
.ts-block.ts-off { background: rgba(0,0,0,0.4); }
.ts-block:first-child { border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
.ts-block:last-child { border-top-right-radius: 6px; border-bottom-right-radius: 6px; }

.strip-legend { display: flex; gap: 16px; font-size: 12px; opacity: 0.9; }
.l-item { display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.d-work { background: #fff; }
.d-weekend { background: rgba(0,0,0,0.4); }

.tip-box-result {
    margin-top: 20px; display: flex; gap: 10px; align-items: center;
    background: rgba(255,255,255,0.1); padding: 12px; border-radius: 12px;
    font-size: 12px; line-height: 1.4;
}

/* Content */
.info-wrapper { padding: 60px 0 60px 0; margin-top: 60px; border-top: 1px solid rgba(0,0,0,0.06); margin-bottom: 20px; }
.info-wrapper .container { max-width: 800px; margin: 0 auto; }

.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; }
.violet-icon svg { color: var(--accent-violet); }
.blue-icon svg { color: #2563EB; }

.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; }
.formula-card p { font-size: 14px; color: var(--text-secondary); margin: 0; line-height: 1.5; font-weight: 500; }

/* Badges */
.badge-violet { background: #EDE9FE; color: #7C3AED; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; display: inline-block; }
/* ДОБАВЛЕН ПРОПУЩЕННЫЙ КЛАСС */
.badge-dark { background: #1F2937; color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; display: inline-block; }

.math-expression { background: #F3E8FF; border: 1px solid #DDD6FE; padding: 12px 16px; border-radius: 12px; font-weight: 700; color: #7C3AED; text-align: center; margin-bottom: 16px; font-size: 15px; }

.soft-divider { border: none; height: 1px; background: linear-gradient(90deg, transparent, #E5E7EB, transparent); margin: 48px 0; }
.calc-description p { font-size: 16px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 24px; }
.calc-description strong { color: var(--text-primary); }

/* FAQ */
.faq-violet-style .faq-item { background: #fff; border: 1px solid #E5E7EB; border-radius: 12px; margin-bottom: 12px; overflow: hidden; transition: all 0.2s ease; }
.faq-violet-style .faq-item[open] { border-color: var(--accent-violet); box-shadow: 0 4px 20px rgba(124, 58, 237, 0.15); }
.faq-violet-style 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; }
.faq-violet-style summary.faq-question:hover { background-color: #F9FAFB; }
.faq-violet-style .faq-item[open] summary.faq-question { color: #5B21B6; background: #F3E8FF; }
.faq-question::after { content: '+'; font-size: 20px; color: var(--text-secondary); font-weight: 400; line-height: 1; }
.faq-question .icon-plus { display: none; }
.faq-violet-style .faq-item[open] summary.faq-question::after { content: '−'; color: #5B21B6; }
.faq-answer { padding: 20px; color: var(--text-secondary); line-height: 1.6; font-size: 15px; }

/* MOBILE */
@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; 
        flex-direction: column; align-items: center; text-align: center;
    }
    .header-icon { width: 48px; height: 48px; margin-top: 0; }
    .header-icon svg { width: 24px; height: 24px; }
    
    /* Центрирование формул */
    .formula-card { padding: 24px; text-align: center; align-items: center; }
    .formula-header { align-items: center; width: 100%; }
    .math-expression { width: 100%; max-width: 300px; margin-left: auto; margin-right: auto; }
    
    .info-wrapper { margin-top: 40px; padding-top: 40px; }
}