﻿/* MIR74 — компактная полоса сервисов в шапке: погода и курсы ЦБ.
   Строка высотой 36 px под логотипом, фон и линии как у остальных рядов шапки. */

.m74-svcbar {
  background: #fff;
  border-top: 1px solid #edf1f6;
  color: #394c59;
}

.m74-svcbar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 36px;
  min-width: 0;
}

/* ---------- общие элементы ---------- */

.m74-svc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.m74-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- погода ---------- */

.m74-svc-ico {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fffdf2, #fdefc6);
  box-shadow: inset 0 0 0 1px #efe0b6;
  color: #dd9700;
}

.m74-svc-ico svg {
  display: block;
  width: 19px;
  height: 19px;
}

.m74-svc-weather[data-wx="partly"] .m74-svc-ico {
  background: radial-gradient(circle at 34% 28%, #fdfeff, #e9f2fb);
  box-shadow: inset 0 0 0 1px #d9e6f2;
  color: #d89215;
}

.m74-svc-weather[data-wx="cloudy"] .m74-svc-ico {
  background: radial-gradient(circle at 34% 28%, #fbfcfe, #e7edf4);
  box-shadow: inset 0 0 0 1px #d7e0ea;
  color: #5f7690;
}

.m74-svc-weather[data-wx="rain"] .m74-svc-ico {
  background: radial-gradient(circle at 34% 28%, #f8fcff, #dbecfb);
  box-shadow: inset 0 0 0 1px #c8e0f5;
  color: #2f6fb5;
}

.m74-svc-weather[data-wx="snow"] .m74-svc-ico {
  background: radial-gradient(circle at 34% 28%, #fdfeff, #e6f1fb);
  box-shadow: inset 0 0 0 1px #d3e6f6;
  color: #4a7fbe;
}

.m74-svc-weather[data-wx="fog"] .m74-svc-ico {
  background: radial-gradient(circle at 34% 28%, #fbfcfd, #e9eef2);
  box-shadow: inset 0 0 0 1px #d8e0e6;
  color: #7c8b9c;
}

.m74-svc-weather[data-wx="storm"] .m74-svc-ico {
  background: radial-gradient(circle at 34% 28%, #fbf8ff, #eee6fb);
  box-shadow: inset 0 0 0 1px #ddd0f3;
  color: #7448bb;
}

.m74-svc-temp {
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.01em;
  color: #061c44;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.m74-svc-weather[data-temp="cool"] .m74-svc-temp { color: #235d9e; }
.m74-svc-weather[data-temp="cold"] .m74-svc-temp { color: #10457f; }
.m74-svc-weather[data-temp="warm"] .m74-svc-temp { color: #b4531a; }

.m74-svc-desc {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.m74-svc-desc b {
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.15;
  color: #263d5b;
  white-space: nowrap;
}

.m74-svc-desc i {
  font-style: normal;
  font-size: 10.5px;
  line-height: 1.15;
  color: #637a9e;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------- курсы ---------- */

.m74-svc-rates {
  gap: 14px;
  flex: 0 0 auto;
}

.m74-cur {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

.m74-cur-badge {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(145deg, #2f8156, #17603a);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}

.m74-cur[data-code="EUR"] .m74-cur-badge {
  background: linear-gradient(145deg, #356fae, #1f4f83);
}

.m74-cur b {
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  color: #061c44;
  font-variant-numeric: tabular-nums;
}

.m74-cur em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
  color: #8a97a8;
}

.m74-cur[data-dir="up"] em { color: #ba3029; }
.m74-cur[data-dir="down"] em { color: #1c7a48; }

.m74-cur-spark {
  display: block;
  width: 44px;
  height: 14px;
  flex: 0 0 auto;
  overflow: visible;
}

.m74-cur-spark .line {
  fill: none;
  stroke: #c3cdd9;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.m74-cur-spark .area {
  fill: rgba(99, 122, 158, .14);
  stroke: none;
}

.m74-cur[data-dir="up"] .m74-cur-spark .line { stroke: #ba3029; }
.m74-cur[data-dir="up"] .m74-cur-spark .area { fill: rgba(186, 48, 41, .10); }
.m74-cur[data-dir="down"] .m74-cur-spark .line { stroke: #1c7a48; }
.m74-cur[data-dir="down"] .m74-cur-spark .area { fill: rgba(28, 122, 72, .10); }

.m74-cur:hover b { color: #0864ff; }
.m74-cur:hover .m74-cur-spark .line { stroke-width: 1.8; }

.m74-cur-stamp {
  font-size: 10.5px;
  line-height: 1;
  color: #637a9e;
  white-space: nowrap;
  padding-left: 12px;
  border-left: 1px solid #e3ebf6;
  font-variant-numeric: tabular-nums;
}

.m74-svc-empty {
  font-size: 11.5px;
  color: #637a9e;
  white-space: nowrap;
}

/* ---------- анимация иконок ---------- */

@keyframes m74-wx-spin { to { transform: rotate(360deg); } }

@keyframes m74-wx-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.1px); }
}

@keyframes m74-wx-drop {
  0% { opacity: 0; transform: translateY(-1.5px); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translateY(2.6px); }
}

.m74-wx-rays {
  transform-origin: 12px 12px;
  animation: m74-wx-spin 40s linear infinite;
}

.m74-wx-cloud { animation: m74-wx-bob 5.5s ease-in-out infinite; }

.m74-wx-drops path { animation: m74-wx-drop 1.7s linear infinite; }
.m74-wx-drops path:nth-child(2) { animation-delay: .4s; }
.m74-wx-drops path:nth-child(3) { animation-delay: .85s; }

/* ---------- адаптив ---------- */

@media (max-width: 1100px) {
  .m74-svc-desc i { display: none; }
  .m74-cur-spark { display: none; }
}

@media (max-width: 900px) {
  .m74-cur-stamp { display: none; }
  .m74-svc-rates { gap: 11px; }
}

@media (max-width: 767px) {
  .m74-svcbar-in { height: 32px; gap: 10px; }
  .m74-svc-ico { width: 22px; height: 22px; }
  .m74-svc-ico svg { width: 16px; height: 16px; }
  .m74-svc-temp { font-size: 14px; }
  .m74-svc-desc { display: none; }
  .m74-cur b { font-size: 12.5px; }
  .m74-cur em { font-size: 9.5px; }
  .m74-svc-rates { gap: 9px; }
}

@media (max-width: 359px) {
  .m74-cur em { display: none; }
  .m74-cur-badge { width: 15px; height: 15px; font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .m74-wx-rays,
  .m74-wx-cloud,
  .m74-wx-drops path { animation: none; }
}
