/* ============================================================
   modules/astro_union/astro_union.css — "Союз влюблённых" (2026-11-18)
   Копия раскладки astro_conception.css с классами astro-union-*.
   ============================================================ */

.astro-union-app .astro-union-two-col {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 10px;
}
.astro-union-app .astro-union-two-col > div {
    flex: 1 1 calc(50% - 20px);
    min-width: 260px;
}
@media (max-width: 768px) {
    .astro-union-app .astro-union-two-col > div { flex: 1 1 100%; }
}

.astro-union-app .astro-union-card {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    background: #f9f9f9;
}
body.theme-dark .astro-union-app .astro-union-card {
    background: #2a2a2a;
    border-color: #444;
}

.astro-union-app .astro-union-gender {
    margin-top: 10px;
}
.astro-union-app .astro-union-gender span {
    font-weight: bold;
    margin-right: 15px;
}
.astro-union-app .astro-union-gender label {
    margin-right: 15px;
}
.astro-union-app .astro-union-partner-label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
}

/* ---------- Двойной ползунок возраста ---------- */
.astro-union-app .astro-union-slider-wrap {
    margin: 20px 0 10px;
    padding: 0 24px; /* подписи над ползунками не уходят за край */
}
.astro-union-app .astro-union-slider-labels-top {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: #555;
    margin-bottom: 2px;
}
body.theme-dark .astro-union-app .astro-union-slider-labels-top {
    color: #aaa;
}
.astro-union-app .range-slider {
    position: relative;
    width: 100%;
    height: 60px;
    margin: 20px 0 10px;
}
.astro-union-app .range-slider input[type="range"] {
    position: absolute; width: 100%; height: 6px; background: transparent;
    pointer-events: none; -webkit-appearance: none; appearance: none;
    top: 50%; transform: translateY(-50%); z-index: 2; cursor: grab;
}
.astro-union-app .range-slider input[type="range"]:active { cursor: grabbing; }
.astro-union-app .range-slider input[type="range"]::-webkit-slider-track { height: 6px; background: transparent; border-radius: 3px; }
.astro-union-app .range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 20px; height: 20px;
    background: #4CAF50; border-radius: 50%; cursor: pointer; pointer-events: auto;
    border: 2px solid white; box-shadow: 0 1px 3px rgba(0,0,0,0.3); z-index: 3;
}
.astro-union-app .range-slider input[type="range"]::-moz-range-track { height: 6px; background: transparent; border-radius: 3px; border: none; }
.astro-union-app .range-slider input[type="range"]::-moz-range-thumb {
    width: 20px; height: 20px; background: #4CAF50; border-radius: 50%; cursor: pointer;
    pointer-events: auto; border: 2px solid white; box-shadow: 0 1px 3px rgba(0,0,0,0.3); z-index: 3;
}
.astro-union-app .range-slider .track-fill {
    position: absolute; height: 6px; background: #4CAF50; border-radius: 3px;
    top: 50%; transform: translateY(-50%); pointer-events: none; z-index: 1; left: 0%; width: 100%;
}
.astro-union-app .range-slider .track-bg {
    position: absolute; height: 6px; background: #ddd; border-radius: 3px;
    top: 50%; transform: translateY(-50%); pointer-events: none; z-index: 0; width: 100%;
}
body.theme-dark .astro-union-app .range-slider .track-bg { background: #555; }
.astro-union-app .range-slider .slider-label {
    position: absolute; top: -25px; font-size: 14px; font-weight: bold; color: #333;
    background: #fff; padding: 0 6px; border-radius: 4px; border: 1px solid #ccc;
    transform: translateX(-50%); pointer-events: none; white-space: nowrap;
}
body.theme-dark .astro-union-app .range-slider .slider-label {
    color: #e0e0e0; background: #2a2a2a; border-color: #555;
}

/* ---------- Форма транзитного места/времени ---------- */
.astro-union-app .astro-union-search-form {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 20px;
}
body.theme-dark .astro-union-app .astro-union-search-form {
    background: #2a2a2a;
}

/* ---------- Прогресс ---------- */
.astro-union-app .astro-union-progress {
    width: 100%;
    margin: 15px 0;
}
.astro-union-app .astro-union-progress-track {
    background: #e9ecef; border-radius: 4px; overflow: hidden;
}
body.theme-dark .astro-union-app .astro-union-progress-track { background: #333; }
.astro-union-app .astro-union-progress-bar {
    width: 0%; height: 30px; background: #4CAF50; color: white; min-width: 2.5em;
    text-align: center; line-height: 30px; border-radius: 4px; transition: width 0.3s;
}
.astro-union-app #astroConceptionStatus {
    margin: 10px 0;
    font-weight: bold;
}

/* ---------- Результаты: сгруппированные периоды ---------- */
.astro-union-app .periods-columns { display: flex; flex-wrap: wrap; gap: 30px; }
.astro-union-app .periods-column { flex: 1 1 300px; min-width: 250px; }
.astro-union-app .periods-column h4 { border-bottom: 2px solid #ddd; padding-bottom: 5px; }
body.theme-dark .astro-union-app .periods-column h4 { border-bottom-color: #444; }

.astro-union-app .group-header {
    cursor: pointer; background: #f0f0f0; padding: 8px 12px; border-radius: 4px;
    margin-bottom: 4px; display: flex; align-items: center; gap: 10px;
}
.astro-union-app .group-header:hover { background: #e0e0e0; }
body.theme-dark .astro-union-app .group-header { background: #333; }
body.theme-dark .astro-union-app .group-header:hover { background: #3d3d3d; }
.astro-union-app .group-header .toggle-icon { font-weight: bold; font-size: 1.2em; }
.astro-union-app .group-content { margin-left: 20px; margin-bottom: 8px; display: none; }
.astro-union-app .group-content.open { display: block; }

.astro-union-app .period-item {
    padding: 4px 8px; border-bottom: 1px solid #eee; display: flex;
    align-items: center; gap: 6px; flex-wrap: wrap;
}
body.theme-dark .astro-union-app .period-item { border-bottom-color: #3a3a3a; }
.astro-union-app .period-item:last-child { border-bottom: none; }
.astro-union-app .period-item span { display: inline-block; min-width: 80px; }
.astro-union-app .period-item .birth-info { width: 100%; font-size: 0.9em; color: #555; margin-top: 2px; }
body.theme-dark .astro-union-app .period-item .birth-info { color: #aaa; }

.astro-union-app .transit-icon { cursor: pointer; color: #0d6efd; font-size: 1.1em; }
.astro-union-app .period-unfavorable { background-color: #fff0f0 !important; border-left: 4px solid #dc3545; }
body.theme-dark .astro-union-app .period-unfavorable { background-color: #3a1a1a !important; border-left-color: #ea868f; }

/* ---------- 2026-11-18: дисклеймер, поля формы, панель результатов ---------- */
.astro-union-app .astro-union-disclaimer {
    font-size: 0.85em; color: #6c5200; background: #fff8e1; border: 1px solid #f3dc8c;
    border-radius: 6px; padding: 8px 12px; margin: 8px 0 14px;
}
body.theme-dark .astro-union-app .astro-union-disclaimer {
    color: #f0d98a; background: #3a3220; border-color: #5c4d25;
}
.astro-union-app .astro-union-field-label {
    display: block; font-size: 0.8em; font-weight: 600; margin-bottom: 2px;
}
.astro-union-app .astro-union-input {
    width: 100%; padding: 4px 6px; border: 1px solid #ccc; border-radius: 4px;
}
body.theme-dark .astro-union-app .astro-union-input {
    background: #1f1f1f; color: #e0e0e0; border-color: #555;
}
.astro-union-app .astro-union-timemode { flex: 0 0 auto; }
.astro-union-app .astro-union-timemode label:not(.astro-union-field-label) { margin-right: 10px; font-size: 0.9em; }
.astro-union-app .astro-union-check { display: block; margin-top: 4px; font-size: 0.9em; }

.astro-union-app .astro-union-notice { margin: 2px 0; }
.astro-union-app .astro-union-toolbar {
    display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 10px 0;
}
.astro-union-app .period-mixed { border-left: 4px solid #f0ad4e; }
.astro-union-app .period-item .period-hours { width: 100%; font-size: 0.85em; color: #666; }
body.theme-dark .astro-union-app .period-item .period-hours { color: #aaa; }
.astro-union-app .period-item .badge { font-size: 0.7rem; min-width: 0; }
.astro-union-app .group-header:focus-visible { outline: 2px solid #0d6efd; outline-offset: 1px; }

/* Вкладки нужны только на узком экране; на широком — три колонки. */
.astro-union-app .astro-union-tabs { display: none; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
@media (max-width: 768px) {
    .astro-union-app .astro-union-tabs { display: flex; }
    .astro-union-app .periods-columns.has-tabs .periods-column { display: none; }
    .astro-union-app .periods-columns.has-tabs .periods-column.is-active { display: block; flex-basis: 100%; }
}
.astro-union-app .astro-union-main-info { margin-top: 2px; }
.astro-union-app .transit-link { text-decoration: none; line-height: 1; }
.astro-union-app .transit-link:hover .transit-icon { opacity: 0.75; }
.astro-union-app .astro-union-pick-profile {
    border-bottom: 1px dashed currentColor; cursor: pointer; color: #0d6efd; white-space: nowrap;
}
.astro-union-app .astro-union-main-info .astro-union-pick-profile { margin-left: 8px; }
.astro-union-app .astro-union-pick-profile:hover { border-bottom-style: solid; }
body.theme-dark .astro-union-app .astro-union-pick-profile { color: #6ea8fe; }

/* Усиленный период */
.astro-union-app .period-strong { border-left: 4px solid #198754; background: #f0fff4; }
body.theme-dark .astro-union-app .period-strong { background: #1b2e22; border-left-color: #75b798; }
.astro-union-app .period-mixed { border-left-color: #0dcaf0; }

/* Кнопка "Разбор" у периода и окно разбора (2026-11-18) */
.astro-union-app .astro-union-explain { border: 0; background: none; padding: 0 4px; color: #0d6efd; font-size: 0.85em; cursor: pointer; }
.astro-union-app .astro-union-explain:hover { text-decoration: underline; }
.astro-union-app .astro-union-explain:disabled { opacity: 0.5; cursor: wait; }
.astro-union-explain-modal .astro-union-explain-person + .astro-union-explain-person { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(0,0,0,0.1); }
.astro-union-explain-modal .astro-union-explain-person ul { margin: 6px 0 0; padding-left: 20px; }
.astro-union-explain-modal .astro-union-explain-person li { margin-bottom: 4px; }
body.theme-dark .astro-union-app .astro-union-explain { color: #6ea8fe; }
body.theme-dark .astro-union-explain-modal .astro-union-explain-person + .astro-union-explain-person { border-top-color: rgba(255,255,255,0.15); }
