/* Модальне вікно процесу пошуку турів */
.sp {
  --sp-blue: #3d8fd6;
  --sp-orange: #f7941d;
  --sp-brand: #c1996f;
  --sp-text: #444;
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: rgba(30, 36, 48, .55);
  backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.sp.is-open { opacity: 1; visibility: visible; }

.sp__dialog {
  position: relative; width: 100%; max-width: 440px; overflow: hidden;
  background: #fff; border-radius: 1rem; box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  color: var(--sp-text); text-align: center;
  transform: translateY(16px) scale(.97); transition: transform .3s cubic-bezier(.2, .9, .3, 1.2);
}
.sp.is-open .sp__dialog { transform: none; }
.sp__close {
  position: absolute; top: .6rem; right: .6rem; z-index: 2; width: 32px; height: 32px;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .7); color: #555; font-size: 1.25rem; line-height: 1;
}
.sp__close:hover { background: #fff; }

/* Небо з маршрутом */
.sp__sky {
  position: relative; height: 150px; overflow: hidden;
  background: linear-gradient(180deg, #7fc1f2 0%, #bfe2fb 70%, #e8f5ff 100%);
}
.sp__cloud {
  position: absolute; width: 90px; height: 26px; border-radius: 26px; background: #fff; opacity: .85;
  animation: sp-cloud 9s linear infinite;
}
.sp__cloud::before, .sp__cloud::after { content: ''; position: absolute; background: #fff; border-radius: 50%; }
.sp__cloud::before { width: 38px; height: 38px; left: 14px; top: -18px; }
.sp__cloud::after { width: 28px; height: 28px; left: 44px; top: -12px; }
.sp__cloud--1 { top: 30px; animation-duration: 11s; }
.sp__cloud--2 { top: 88px; transform: scale(.7); animation-duration: 8s; animation-delay: -4s; opacity: .7; }
.sp__cloud--3 { top: 58px; transform: scale(.5); animation-duration: 14s; animation-delay: -9s; opacity: .6; }
@keyframes sp-cloud { from { left: 110%; } to { left: -30%; } }

.sp__route { position: absolute; left: 50%; bottom: 26px; width: 300px; height: 110px; margin-left: -150px; }
.sp__route svg { position: absolute; inset: 0; overflow: visible; }
.sp__path { fill: none; stroke: #fff; stroke-width: 2; stroke-dasharray: 6 6; animation: sp-dash 1s linear infinite; }
@keyframes sp-dash { to { stroke-dashoffset: -12; } }
.sp__dot { fill: #fff; stroke: var(--sp-blue); stroke-width: 3; }
.sp__plane {
  position: absolute; left: 0; top: 0; width: 30px; height: 30px; color: #fff;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25));
  offset-path: path('M 12 96 Q 150 -30 288 96');
  offset-rotate: auto;
  animation: sp-fly 3.2s ease-in-out infinite;
}
.sp__plane svg { width: 100%; height: 100%; transform: rotate(90deg); }
@keyframes sp-fly {
  0% { offset-distance: 0%; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}
.sp__city { position: absolute; bottom: -18px; font-size: .72rem; font-weight: 700; color: #1f5f96; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp__city--from { left: 0; }
.sp__city--to { right: 0; text-align: right; }

.sp__body { padding: 1.25rem 1.5rem 1.5rem; }
.sp__title { font-size: 1.15rem; font-weight: 700; margin: 0 0 .25rem; }
.sp__tip { min-height: 1.3rem; font-size: .85rem; color: #777; margin: 0 0 1rem; transition: opacity .3s; }
.sp__tip.is-fading { opacity: 0; }

/* Прогрес операторів */
.sp__bar { height: 8px; border-radius: 4px; background: #edf0f4; overflow: hidden; }
.sp__bar-fill {
  height: 100%; width: 0; border-radius: 4px; transition: width .6s ease;
  background: linear-gradient(90deg, var(--sp-orange), #ffb347);
}
.sp__bar.is-indeterminate .sp__bar-fill {
  width: 35%; animation: sp-indeterminate 1.2s ease-in-out infinite;
}
@keyframes sp-indeterminate { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.sp__progress-text { display: flex; justify-content: space-between; font-size: .75rem; color: #888; margin-top: .35rem; }

.sp__stats { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 1.1rem 0 1.25rem; }
.sp__stat { background: #f5f7fa; border-radius: .6rem; padding: .6rem .5rem; }
.sp__stat-value { display: block; font-size: 1.35rem; font-weight: 700; color: var(--sp-blue); line-height: 1.2; font-variant-numeric: tabular-nums; }
.sp__stat-value--price { color: var(--sp-orange); }
.sp__stat-label { font-size: .72rem; color: #888; }

.sp__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; width: 100%;
  border: 0; border-radius: .5rem; padding: .7rem 1rem; font-weight: 700;
  background: var(--sp-orange); color: #fff; transition: background .2s, opacity .2s, transform .2s;
}
.sp__btn:hover { background: #e5820b; }
.sp__btn:disabled { background: #e9ecef; color: #9aa0a8; cursor: default; }
.sp__btn-count { display: inline-block; min-width: 1.6rem; padding: 0 .4rem; border-radius: 1rem; background: rgba(255, 255, 255, .25); font-size: .8rem; }
.sp__note { font-size: .72rem; color: #9aa0a8; margin-top: .6rem; }

/* Завершення */
.sp.is-done .sp__plane { animation: none; offset-distance: 100%; opacity: 1; }
.sp.is-done .sp__path { animation: none; }
.sp.is-done .sp__bar-fill { background: #5cb85c; }
.sp.is-empty .sp__plane { animation: none; opacity: 0; }
.sp.is-done .sp__note, .sp.is-empty .sp__note { display: none; }

@media (prefers-reduced-motion: reduce) {
  .sp__cloud, .sp__path, .sp__bar.is-indeterminate .sp__bar-fill { animation: none; }
  .sp__plane { animation: none; offset-distance: 50%; }
  .sp, .sp__dialog { transition: none; }
}
@media (max-width: 400px) {
  .sp__route { transform: scale(.85); }
  .sp__body { padding: 1rem; }
}
