/* point_forecast/style.css
 * Дополнительные стили для страницы "Точечный прогноз".
 * Переменные (--primary-color, --card-bg, --shadow-color и т.д.) берём из /style.css проекта.
 */

/* ===== Карта ===== */
.pf-map-card { padding: 20px; }

.pf-map-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.pf-map-toolbar .btn-light {
    background: #fff;
    color: var(--primary-color);
    border: 1.5px solid var(--secondary-color);
    padding: 8px 14px;
    font-size: 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.pf-map-toolbar .btn-light:hover { background: #f3f7f1; }
.pf-map-toolbar .btn-light:active { transform: translateY(1px); }

.pf-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-color);
}
.pf-toggle input { width: 16px; height: 16px; cursor: pointer; }

.pf-hint {
    margin-left: auto;
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
}
@media (max-width: 720px) {
    .pf-hint { width: 100%; margin-left: 0; }
}

.pf-map {
    width: 100%;
    height: 480px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #f0ebe3;
}
@media (max-width: 720px) {
    .pf-map { height: 380px; }
}

/* Легенда под картой */
.pf-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    padding: 10px 14px;
    background: #fafaf6;
    border-radius: 10px;
    font-size: 0.9rem;
}
.pf-legend-title { font-weight: 500; color: #555; }
.pf-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.pf-legend-item .dot {
    width: 14px; height: 14px; border-radius: 50%;
    display: inline-block;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}
.dot-excellent { background: #2980b9; }
.dot-high      { background: #27ae60; }
.dot-medium    { background: #e67e22; }
.dot-low       { background: #c0392b; }
.dot-none      { background: #7f8c8d; }

/* ===== Empty state ===== */
.pf-empty-state h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 12px;
    border: none;
    padding: 0;
}
.pf-empty-state p { color: #555; }
.pf-features {
    list-style: none;
    margin-top: 16px;
    padding: 0;
}
.pf-features li {
    padding: 8px 0;
    color: var(--text-color);
    border-bottom: 1px dashed var(--border-color);
}
.pf-features li:last-child { border-bottom: none; }

/* ===== Лоадер ===== */
.pf-loader { text-align: center; padding: 40px 30px; }
.pf-loader p { margin-top: 12px; color: #555; }
.pf-loader-step { font-size: 0.9rem; color: #888; font-style: italic; }
.pf-spinner {
    width: 48px; height: 48px;
    border: 4px solid #e8e8e8;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto;
    animation: pf-spin 0.9s linear infinite;
}
@keyframes pf-spin { to { transform: rotate(360deg); } }

/* ===== Результат ===== */
.pf-result {
    animation: pf-fade-in 0.4s ease-out;
}
@keyframes pf-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.pf-result-header h2 { font-size: 1.8rem; }
.pf-meta-chip {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 10px;
    background: #f3f7f1;
    border-radius: 999px;
    font-size: 0.9rem;
}

/* ===== Карточка вердикта ===== */
.pf-verdict-card {
    border-left: 6px solid var(--primary-color);
    margin-bottom: 30px;
}
.pf-verdict-card h2 {
    border: none;
    padding-bottom: 8px;
    margin-bottom: 8px;
    font-size: 1.5rem;
}
.pf-verdict-text {
    font-size: 1.05rem;
    color: #444;
    margin-bottom: 14px;
}
.pf-verdict-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}
.pf-verdict-reasons li {
    padding: 6px 12px;
    background: #fafaf6;
    border-radius: 999px;
    font-size: 0.95rem;
    color: #555;
}

.pf-verdict-card.verdict-excellent { border-left-color: #2980b9; }
.pf-verdict-card.verdict-good      { border-left-color: #27ae60; }
.pf-verdict-card.verdict-medium    { border-left-color: #e67e22; }
.pf-verdict-card.verdict-low       { border-left-color: #c0392b; }
.pf-verdict-card.verdict-none      { border-left-color: #7f8c8d; }

.pf-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}
.pf-share-actions .btn-light {
    background: #fff;
    color: var(--primary-color);
    border: 1.5px solid var(--secondary-color);
    padding: 8px 14px;
    font-size: 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.pf-share-actions .btn-light:hover { background: #f3f7f1; }

/* ===== Сравнение ===== */
.pf-comparison {
    margin-top: 18px;
    padding: 14px 16px;
    background: #fafaf6;
    border-radius: 10px;
    border-left: 4px solid var(--secondary-color);
}
.pf-comparison-header {
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 6px;
}
.pf-comparison p { color: #555; }

/* ===== Формула / explanation ===== */
.pf-formula {
    background: #fafaf6;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 16px;
    font-family: 'SF Mono', Menlo, monospace;
    font-size: 0.95rem;
}
.pf-formula-line { display: flex; gap: 10px; margin: 4px 0; }
.pf-formula-label {
    font-weight: 500;
    color: var(--primary-color);
    min-width: 50px;
}
.pf-formula-eq { color: #555; }

.pf-explanation {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}
.pf-explanation li {
    padding: 8px 12px;
    border-left: 3px solid var(--secondary-color);
    background: #fbfbf8;
    margin-bottom: 6px;
    border-radius: 0 6px 6px 0;
    color: #444;
    line-height: 1.5;
}

/* ===== Метеосводка ===== */
.pf-meteo-details {
    margin-top: 8px;
    padding: 10px 14px;
    background: #fafaf6;
    border-radius: 10px;
    cursor: pointer;
}
.pf-meteo-details summary {
    font-weight: 500;
    color: var(--primary-color);
    user-select: none;
}
.pf-meteo-summary { padding-top: 12px; color: #555; }
.pf-meteo-note { color: #999; font-size: 0.85rem; }

.pf-meteo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(85px, 1fr));
    gap: 8px;
    margin-top: 12px;
}
.pf-meteo-day {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    font-size: 0.85rem;
}
.pf-meteo-day.is-future {
    border-style: dashed;
    border-color: var(--secondary-color);
    background: #f9fbf8;
}
.pf-meteo-day .pf-meteo-date {
    font-weight: 500;
    color: var(--primary-color);
}
.pf-meteo-day .pf-meteo-temp { font-size: 1rem; margin: 4px 0; }
.pf-meteo-day .pf-meteo-rain { color: #3498db; font-size: 0.85rem; }

/* ===== Грибы и ТВП — стили в основном файле есть, тут только тонкая настройка ===== */
.pf-mushrooms { margin-top: 30px; }
.pf-tvp { margin-top: 30px; }

/* Активность-бар в шаблоне (без модификатора цвета — задаём в JS) */
.activity-bar.activity-high { background: #27ae60; }
.activity-bar.activity-mid  { background: #e67e22; }
.activity-bar.activity-low  { background: #c0392b; }

/* ===== Карточка "что рядом" ===== */
.pf-nearby-card {
    margin-top: 30px;
    background: #fbfbf8;
    border-style: dashed;
}
.pf-nearby-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.pf-nearby-list .pf-nearby-item {
    padding: 6px 12px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 0.9rem;
    color: #555;
}
.pf-nearby-list .pf-nearby-item.has-reports {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.pf-nearby-list a.pf-nearby-item:hover {
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
}

/* ===== Toast (уведомления) ===== */
.pf-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--text-color);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    font-size: 0.95rem;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 9999;
    pointer-events: none;
    max-width: 90%;
    text-align: center;
}
.pf-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.pf-toast.is-error  { background: #c0392b; }
.pf-toast.is-success { background: #27ae60; }

/* ===== Mobile tweaks ===== */
@media (max-width: 720px) {
    .pf-map-card { padding: 14px; }
    .pf-result-header h2 { font-size: 1.4rem; }
    .pf-meta-chip { display: block; margin: 6px 0 0; }
    .pf-share-actions { flex-direction: column; }
    .pf-share-actions .btn-light { width: 100%; }
    .pf-formula { font-size: 0.85rem; }
}

/* Когда показан результат — empty-state скрываем */
body.pf-has-result .pf-empty-state { display: none; }
