/* calc/assets/css/calculators/time-zone-converter.css */

:root {
    --tz-primary: #3730A3; /* Глубокий синий / Indigo-800 */
    --tz-bg: #EEF2FF;      /* Предрассветное небо / Indigo-50 */
    --tz-dark: #1E1B4B;    /* Ночь */
    --tz-accent: #6366F1;  /* Яркий синий */
    
    --time-green: #10B981;
    --time-green-bg: #ECFDF5;
    
    --time-yellow: #F59E0B;
    --time-yellow-bg: #FFFBEB;
    
    --time-red: #8B5CF6; /* Ночь сделаем фиолетовой для красоты, а не красной */
    --time-red-bg: #F5F3FF;
}

/* --- ВЕРХНЯЯ ЧАСТЬ --- */
.calc-header { margin-bottom: 40px; }
.subtitle { color: var(--text-secondary); margin-top: 12px; font-size: 16px; line-height: 1.5; }

.calc-grid { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
@media (min-width: 992px) { .calc-grid { grid-template-columns: 1fr 1.1fr; gap: 48px; } }

/* Инпуты (Селекторы городов) - ИСПРАВЛЕНО ДЛЯ МОБИЛЬНЫХ */
.timezone-selector {
    background: #F9FAFB; border: 1px solid #E5E7EB;
    border-radius: 20px; padding: 24px; margin-bottom: 24px;
    display: flex; flex-direction: column; gap: 16px;
}

.tz-box { display: flex; flex-direction: column; }
.tz-title { font-size: 13px; font-weight: 700; color: #4B5563; text-transform: uppercase; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.tz-title i { color: var(--tz-primary); font-size: 16px; }
.box-target .tz-title { color: var(--tz-accent); }

/* Разделитель между городами */
.tz-divider-box { display: flex; justify-content: center; }
.swap-button {
    width: 44px; height: 44px; border-radius: 50%; border: 4px solid #F9FAFB;
    background: var(--tz-primary); color: #fff; font-size: 20px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); 
    box-shadow: 0 4px 10px rgba(55, 48, 163, 0.2);
}
.swap-button:hover { transform: scale(1.1) rotate(180deg); }
.swap-button:active { transform: scale(1); }


/* --- KILLER FEATURE: Кастомный селект --- */
.custom-select-wrapper { width: 100%; position: relative; }
.custom-select-trigger {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; border: 1px solid #D1D5DB; border-radius: 12px;
    background: #fff; cursor: pointer; transition: all 0.2s;
}
.custom-select-trigger:hover { border-color: #9CA3AF; }
.custom-select-wrapper.open .custom-select-trigger { border-color: var(--tz-primary); box-shadow: 0 0 0 3px rgba(55, 48, 163, 0.1); }
.custom-select-trigger .flag { font-size: 22px; line-height: 1; }
.custom-select-trigger .code { font-size: 16px; font-weight: 600; flex-grow: 1; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.custom-select-trigger .ri-arrow-down-s-line { color: #9CA3AF; transition: transform 0.2s; margin-left: auto; }
.custom-select-wrapper.open .ri-arrow-down-s-line { transform: rotate(180deg); }

.custom-select-options {
    position: absolute; top: 100%; left: 0; width: 100%;
    background: #fff; border: 1px solid #E5E7EB; border-radius: 12px;
    box-shadow: var(--shadow-float); z-index: 100;
    margin-top: 8px; padding: 8px;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: all 0.2s;
}
.custom-select-wrapper.open .custom-select-options { opacity: 1; visibility: visible; transform: translateY(0); }

.option-search {
    width: 100%; padding: 12px; border: 1px solid #E5E7EB; border-radius: 8px;
    margin-bottom: 8px; outline: none; font-size: 14px;
}
.options-list { max-height: 250px; overflow-y: auto; padding-right: 4px; }
.options-list::-webkit-scrollbar { width: 4px; }
.options-list::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 2px; }

.option-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px; border-radius: 8px; cursor: pointer;
}
.option-item:hover, .option-item.selected { background: var(--tz-bg); }
.option-item .name { font-size: 14px; font-weight: 600; color: #374151; }
.option-item .sub { font-size: 12px; color: #9CA3AF; }

/* Общие для левой карточки */
.form-divider { border: none; height: 1px; background: #C7D2FE; margin: 24px 0; opacity: 0.7; }
.group-title-small { font-size: 14px; font-weight: 700; color: var(--tz-primary); text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 16px 0; border-left: 3px solid var(--tz-primary); padding-left: 8px; }
.label-with-icon { display: flex; align-items: center; gap: 8px; color: var(--tz-primary) !important; font-size: 15px !important; font-weight: 700 !important; margin-bottom: 12px; }
.helper-text { font-size: 12px; color: #6B7280; line-height: 1.4; }
.mt-3 { margin-top: 16px; }
.highlight-group { background: var(--tz-bg); padding: 24px; border-radius: 16px; border: 1px dashed var(--tz-primary); }

/* Range Slider */
.time-picker-wrapper { display: flex; flex-direction: column; align-items: center; }
.tp-display { font-size: 42px; font-weight: 800; color: var(--tz-primary); line-height: 1; letter-spacing: -1px; margin-bottom: 16px; }
.tz-slider { width: 100%; -webkit-appearance: none; height: 8px; background: #C7D2FE; border-radius: 4px; outline: none; cursor: pointer; }
.tz-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; background: var(--tz-primary); border-radius: 50%; cursor: grab; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
.tp-labels { width: 100%; display: flex; justify-content: space-between; font-size: 12px; color: #6366F1; font-weight: 700; margin-top: 8px; }


/* --- ПРАВАЯ ЧАСТЬ: РЕЗУЛЬТАТ (KILLER FEATURE) --- */
@media (min-width: 992px) { .sticky-card { position: sticky; top: 24px; transition: top 0.3s; } }

.tz-result-card {
    background: #fff; border: 2px solid var(--tz-bg); padding: 32px;
    border-top: 6px solid var(--tz-primary); border-radius: 20px;
    box-shadow: 0 20px 40px -10px rgba(55, 48, 163, 0.08);
}

.result-header { text-align: center; margin-bottom: 32px; }
.result-header h2 { font-size: 14px; font-weight: 800; color: #9CA3AF; margin: 0 0 8px 0; text-transform: uppercase; letter-spacing: 1px; }
.main-profit span { font-size: 56px; font-weight: 800; color: var(--tz-dark); line-height: 1; letter-spacing: -2px; }

.diff-badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--tz-bg); color: var(--tz-primary); padding: 6px 16px;
    border-radius: 99px; font-size: 13px; font-weight: 700; margin-top: 12px;
    border: 1px solid #C7D2FE;
}

/* KILLER FEATURE: Статус созвона */
.call-status-box {
    background: #F9FAFB; border: 1px solid #E5E7EB; border-radius: 16px; padding: 24px;
    text-align: center; transition: background-color 0.5s, border-color 0.5s;
}
.cs-title { font-size: 13px; font-weight: 700; color: #4B5563; margin: 0 0 8px 0; text-transform: uppercase; }
.cs-time { font-size: 48px; font-weight: 800; color: #111827; line-height: 1; letter-spacing: -1px; margin-bottom: 20px; font-family: monospace;}

.cs-verdict { display: flex; align-items: center; gap: 16px; text-align: left; }
.csv-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.csv-text { display: flex; flex-direction: column; }
.csv-text strong { font-size: 16px; font-weight: 800; color: #111827; margin-bottom: 2px; }
.csv-text span { font-size: 13px; color: #6B7280; line-height: 1.4; }

/* Динамические классы статуса */
.status-green { background: var(--time-green-bg); border-color: #A7F3D0; }
.status-green .csv-icon { color: var(--time-green); }
.status-green strong { color: #065F46; }

.status-yellow { background: var(--time-yellow-bg); border-color: #FDE68A; }
.status-yellow .csv-icon { color: var(--time-yellow); }
.status-yellow strong { color: #92400E; }

.status-red { background: var(--time-red-bg); border-color: #DDD6FE; }
.status-red .csv-icon { color: var(--time-red); }
.status-red strong { color: #4C1D95; }


/* Итоги (Живые часы) */
.summary-divider { height: 2px; background: repeating-linear-gradient(90deg, #D1D5DB 0, #D1D5DB 6px, transparent 6px, transparent 12px); margin: 24px 0; opacity: 0.6; }

.live-clocks { display: flex; justify-content: center; }
.lc-item { display: flex; flex-direction: column; align-items: center; background: #1F2937; color: #fff; padding: 16px 24px; border-radius: 16px; box-shadow: inset 0 2px 10px rgba(0,0,0,0.5); width: 100%; }
.lc-label { font-size: 11px; font-weight: 700; color: #9CA3AF; text-transform: uppercase; margin-bottom: 4px; letter-spacing: 1px; }
.lc-time { font-size: 32px; font-weight: 800; color: #fff; font-family: monospace; letter-spacing: 2px; line-height: 1; margin-bottom: 4px; }
.lc-date { font-size: 13px; color: #6EE7B7; font-weight: 600; }


/* --- НИЖНЯЯ ЧАСТЬ (SEO, INFO) --- */
.info-wrapper { padding: 80px 0; margin-top: 60px; border-top: 1px solid #E5E7EB; }

.author-badge { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 40px; padding: 20px; background: #F8FAFC; border-radius: 16px; border: 1px solid #E2E8F0; }
.author-avatar { width: 48px; height: 48px; background: var(--tz-dark); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.author-info { display: flex; flex-direction: column; min-width: 0; }
.author-name { font-size: 15px; font-weight: 700; color: #111827; line-height: 1.4; margin-bottom: 4px; }
.author-date { font-size: 13px; color: #6B7280; }

.icon-heading { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 32px; font-size: 26px; font-weight: 800; color: #111827; line-height: 1.25; letter-spacing: -0.02em; }
.header-icon { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 14px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.06); flex-shrink: 0; margin-top: -6px; font-size: 26px; }

.blue-icon { color: var(--tz-accent); }
.dark-icon { color: var(--tz-dark); }
.text-danger { color: #EF4444; font-weight: 700;}
.text-success { color: #10B981; font-weight: 700;}
.text-warning { color: #F59E0B; font-weight: 700;}

.formulas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 56px; }
.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: 32px; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); display: flex; flex-direction: column; }
.formula-card:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(99, 102, 241, 0.1); border-color: rgba(99, 102, 241, 0.1); }
.formula-header { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.formula-card h3 { margin: 0; font-size: 20px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }

.badge-blue { background: var(--tz-accent); color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; display: inline-block; }
.badge-dark { background: var(--tz-dark); color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; display: inline-block; }

.formula-card p { font-size: 15px; color: var(--text-secondary); margin: 0; line-height: 1.6; font-weight: 500; }

.soft-divider { border: none; height: 1px; background: linear-gradient(90deg, transparent, #E5E7EB, transparent); margin: 56px 0; opacity: 0.7; }
.intro-text { font-size: 16px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 40px; }
.calc-description p { font-size: 17px; line-height: 1.7; color: #4B5563; margin-bottom: 24px; }
.calc-description strong { color: #1F2937; font-weight: 700; }

/* Перелинковка */
.internal-links-box { margin-top: 32px; background: #F3F4F6; padding: 24px; border-radius: 16px; border-left: 4px solid var(--tz-accent); }
.internal-links-box h4 { margin: 0 0 12px 0; font-size: 17px; color: #111827; }
.internal-links-box ul { margin: 0; padding-left: 20px; color: #4B5563; }
.internal-links-box li { margin-bottom: 8px; font-size: 15px; }
.internal-links-box a { color: var(--tz-primary); text-decoration: underline; font-weight: 600; }

/* SEO Таблица */
.seo-table-wrapper { overflow-x: auto; margin-bottom: 48px; background: #fff; border-radius: 16px; border: 1px solid #E5E7EB; box-shadow: 0 4px 10px rgba(0,0,0,0.02); }
.seo-table-wrapper::-webkit-scrollbar { height: 6px; }
.seo-table-wrapper::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 3px; }
.seo-table { width: 100%; border-collapse: collapse; min-width: 500px; text-align: left; }
.seo-table th { background: #F9FAFB; padding: 18px 24px; font-size: 13px; font-weight: 800; color: #6B7280; text-transform: uppercase; border-bottom: 1px solid #E5E7EB; letter-spacing: 0.5px; }
.seo-table td { padding: 18px 24px; font-size: 14px; border-bottom: 1px solid #F3F4F6; color: #374151; vertical-align: top; line-height: 1.5; }
.seo-table tr:last-child td { border-bottom: none; }

.faq-section .faq-item { background: #fff; border: 1px solid #E5E7EB; border-radius: 16px; margin-bottom: 16px; overflow: hidden; transition: all 0.2s ease; }
.faq-section .faq-item:hover { border-color: #D1D5DB; }
.faq-section .faq-item[open] { border-color: var(--tz-primary); box-shadow: 0 8px 20px rgba(55, 48, 163, 0.08); }
summary.faq-question { padding: 22px 28px; cursor: pointer; font-weight: 700; color: var(--text-primary); font-size: 17px; list-style: none; position: relative; display: flex; justify-content: space-between; align-items: center; transition: background 0.2s; }
.faq-section .faq-item[open] summary.faq-question { color: var(--tz-primary); background: var(--tz-bg); border-bottom: 1px solid #C7D2FE; }
.faq-question::after { content: '+'; font-size: 26px; color: #9CA3AF; font-weight: 400; line-height: 1; transition: transform 0.3s; }
.faq-section .faq-item[open] summary.faq-question::after { content: '−'; color: var(--tz-primary); }
.faq-answer, .faq-item div[itemprop="text"] { padding: 28px; color: var(--text-secondary); line-height: 1.7; font-size: 16px; background: #fff; }
.faq-answer p { margin: 0; }

@media (max-width: 900px) {
    .calc-header { margin-bottom: 32px; }
    .formulas-grid { grid-template-columns: 1fr; gap: 20px; }
    .icon-heading { font-size: 22px; gap: 12px; }
    .header-icon { width: 44px; height: 44px; font-size: 22px; }
    .formula-card { padding: 24px; }
    summary.faq-question { padding: 18px 20px; font-size: 16px; }
    .faq-answer, .faq-item div[itemprop="text"] { padding: 20px; font-size: 15px; }
}

@media (max-width: 480px) {
    .author-badge { padding: 16px; gap: 12px; align-items: flex-start; flex-direction: row; }
    .author-avatar { width: 40px; height: 40px; font-size: 18px; }
    
    .tz-divider-box { margin: -10px 0; }
    
    .cs-verdict { flex-direction: column; align-items: center; text-align: center; }
}