/* --- Стили для Schengen Calculator (EU Theme) --- */
:root {
    --accent-eu-blue: #004494; /* Глубокий синий ЕС */
    --accent-eu-light: #EFF6FF;
    --gradient-eu-card: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    --text-on-eu: #172554; 
}

.calc-header { margin-bottom: 24px; }
.subtitle { color: var(--text-secondary); margin-top: 6px; }

/* Сетка */
.calc-grid { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: 1.2fr 0.8fr; } }

/* Inputs - Compact */
.calc-inputs { gap: 16px; position: relative; z-index: 50; overflow: visible; }
.input-group { margin-bottom: 16px; }
.input-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-primary); }

.input-wrapper input {
    width: 100%; padding: 12px 14px; 
    font-size: 16px; font-weight: 500;
    border: 1px solid #E5E7EB; border-radius: 10px;
    outline: none; transition: border 0.2s;
    font-family: var(--font-main);
}
.input-wrapper input:focus { border-color: var(--accent-eu-blue); box-shadow: 0 0 0 3px rgba(0, 68, 148, 0.1); }

.divider { border: 0; border-top: 1px solid #E5E7EB; margin: 20px 0; }

/* Trips Manager */
.trips-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.trips-header label { margin: 0; }

.btn-mini {
    background: #fff; color: var(--accent-eu-blue); border: 1px solid #BFDBFE;
    padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 700;
    cursor: pointer; display: flex; align-items: center; gap: 4px; transition: all 0.2s;
}
.btn-mini:hover { background: #EFF6FF; border-color: var(--accent-eu-blue); }

.trip-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; animation: slideDown 0.2s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

.date-pair {
    display: flex; flex: 1; align-items: center; gap: 8px;
    background: #F9FAFB; padding: 4px 8px; border: 1px solid #E5E7EB; border-radius: 10px;
}
.date-pair input {
    border: none; background: transparent; padding: 8px 4px; font-size: 14px; width: 100%;
    color: var(--text-primary); outline: none; text-align: center;
}
.date-sep { color: var(--text-secondary); font-size: 14px; }

.btn-remove {
    width: 32px; height: 32px; border: none; background: #FEF2F2; color: #EF4444;
    border-radius: 8px; cursor: pointer; font-size: 18px; line-height: 1;
    display: flex; align-items: center; justify-content: center; transition: background 0.2s;
}
.btn-remove:hover { background: #FEE2E2; }

.action-row { display: flex; gap: 12px; margin-top: 24px; }
.btn-primary {
    flex: 2; background: var(--accent-eu-blue); color: #fff; border: none;
    padding: 12px; border-radius: 10px; font-weight: 700; cursor: pointer; font-size: 15px;
    transition: background 0.2s;
}
.btn-primary:hover { background: #1E3A8A; }
.btn-text {
    flex: 1; background: transparent; border: 1px solid #E5E7EB; color: var(--text-secondary);
    padding: 12px; border-radius: 10px; font-weight: 600; cursor: pointer; transition: background 0.2s;
}
.btn-text:hover { background: #F9FAFB; }

/* --- RESULT CARD --- */
.card--eu { 
    background: var(--gradient-eu-card); 
    color: var(--text-on-eu); 
    border: 1px solid rgba(0, 68, 148, 0.15);
    overflow: visible;
}

.result-header-row { 
    display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px;
}
.card--eu h2 { color: var(--text-on-eu) !important; margin: 0; font-size: 20px; }

.schengen-main-result { text-align: center; margin-bottom: 24px; }
.status-badge {
    display: inline-block; padding: 4px 12px; border-radius: 99px;
    background: rgba(255,255,255,0.6); font-size: 12px; font-weight: 700;
    margin-bottom: 8px; color: var(--text-on-eu);
}
.status-badge.ok { background: #DCFCE7; color: #166534; }
.status-badge.danger { background: #FEE2E2; color: #991B1B; }

.result-days-big {
    font-size: 64px; font-weight: 800; line-height: 1; 
    color: var(--text-on-eu); display: flex; flex-direction: column; align-items: center;
}
.result-days-big small { font-size: 14px; font-weight: 600; opacity: 0.8; margin-top: 4px; }

.info-row { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.info-col {
    flex: 1; background: rgba(255,255,255,0.5); border-radius: 10px; padding: 10px;
    display: flex; flex-direction: column; align-items: center;
}
.info-col .label { font-size: 10px; text-transform: uppercase; font-weight: 700; opacity: 0.7; margin-bottom: 4px; }
.info-col strong { font-size: 20px; font-weight: 800; }

/* --- TIMELINE --- */
.timeline-wrapper {
    background: #fff; border-radius: 12px; padding: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); margin-bottom: 16px;
}
.timeline-header {
    display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 8px;
    font-weight: 600; color: var(--text-secondary);
}
.timeline-label { text-transform: uppercase; }

.visual-timeline {
    height: 20px; background: #E5E7EB; border-radius: 6px; overflow: hidden;
    display: flex; margin-bottom: 8px; border: 1px solid rgba(0,0,0,0.05);
}
.t-seg { height: 100%; flex: 1; }
.t-seg.empty { background: #E5E7EB; }
.t-seg.used { background: var(--accent-eu-blue); }
.t-seg.over { background: #EF4444; }

.timeline-legend {
    display: flex; gap: 12px; justify-content: center;
    font-size: 10px; color: var(--text-secondary); font-weight: 600;
}
.legend-item { display: flex; align-items: center; gap: 4px; }
.dot { width: 6px; height: 6px; border-radius: 50%; }
.dot.used { background: var(--accent-eu-blue); }
.dot.empty { background: #E5E7EB; border: 1px solid #D1D5DB; }

.summary-divider { height: 1px; background: rgba(30, 58, 138, 0.15); margin: 20px 0; }

.tip-box { 
    font-size: 13px; opacity: 1; line-height: 1.4; 
    font-weight: 600; color: var(--text-on-eu) !important; margin-top: 0;
}
#tip-text { color: var(--text-on-eu) !important; margin: 0; }

/* --- НИЖНИЙ КОНТЕНТ (RICH STYLE) --- */
.info-wrapper { padding: 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; gap: 16px; margin-bottom: 24px; font-size: 24px; font-weight: 800; color: var(--text-primary); line-height: 1.3; }
.header-icon { 
    width: 48px; height: 48px; border-radius: 14px; background: #fff; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.04); display: flex; align-items: center; justify-content: center; margin-top: -4px;
}
.header-icon svg { width: 24px; height: 24px; stroke-width: 2px; }

.blue-icon svg { color: #2563EB; }
.orange-icon svg { color: #F59E0B; }
.green-icon svg { color: #10B981; }

.small-heading { margin-top: 40px; margin-bottom: 16px; font-size: 20px; }
.small-heading .header-icon { width: 40px; height: 40px; }
.small-heading .header-icon svg { width: 20px; height: 20px; }

.intro-text { font-size: 16px; color: var(--text-secondary); margin-bottom: 32px; line-height: 1.6; }

/* Формулы (Rich Cards) */
.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; transition: transform 0.2s;
}
.formula-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }

.formula-header { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.formula-card h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--text-primary); }

.badge-blue { background: #2563EB; color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; align-self: flex-start; }
.badge-gold { background: #CA8A04; color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; align-self: flex-start; }

.formula-card p { font-size: 14px; color: var(--text-secondary); margin: 0; line-height: 1.5; }
.math-expression {
    background: #F9FAFB; border: 1px solid #E5E7EB; padding: 12px 16px;
    border-radius: 12px; font-weight: 700; color: var(--accent-eu-blue);
    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 EU Style (Rich) */
.faq-eu-style .faq-item {
    background: #fff; border: 1px solid #E5E7EB;
    border-radius: 12px; margin-bottom: 10px;
    overflow: hidden; transition: all 0.2s ease;
}
.faq-eu-style .faq-item[open] { border-color: var(--accent-eu-blue); box-shadow: 0 4px 20px rgba(0, 68, 148, 0.15); }
.faq-eu-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;
}
.faq-eu-style summary.faq-question:hover { background-color: #F9FAFB; }
.faq-eu-style .faq-item[open] summary.faq-question { color: var(--accent-eu-blue); background: #DBEAFE; }
.faq-question::after { content: '+'; font-size: 20px; color: var(--text-secondary); }
.faq-eu-style .faq-item[open] summary.faq-question::after { content: '−'; color: var(--accent-eu-blue); }
.faq-answer { 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; }
    .icon-heading { font-size: 20px; }
}