/* Click Travel v4 · «Новый Travel» Home (9:1154). Colours, radii and spacing are Coin tokens; where the
   frame uses values outside the Coin scale (AI card 24, its field 12) the nearest token is used (island 16,
   garden 8). */

/* Header: avatar + name (User Profile Button 9:4950) and the bell */
.h4-head{justify-content:space-between;padding-left:var(--space-base-l);padding-right:var(--space-base-l)}
.h4-user{display:flex;align-items:center;gap:var(--space-base-m);min-width:0;background:none;font:inherit;color:var(--theme-text-primary);cursor:pointer}
/* Avatar (AvatarForMain 253:5879): the square slot; the picture overhangs it (badge right, 2px up). */
.h4-avatar{position:relative;flex:none;display:block}
.h4-avatar>.av-svg,.h4-avatar>img{position:absolute;left:0}
.h4-user__name{font-size:17px;line-height:22px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.h4-user__name.is-guest{color:var(--theme-text-accent)}
.m3-head>.h4-user,.m3-head>.h4-bell{opacity:calc(1 - var(--m3) * 2.2);transform:translateY(calc(var(--m3) * -18px)) scale(calc(1 - var(--m3) * .2));filter:blur(calc(var(--m3) * 6px))}
.av-h3.is-collapsed .m3-head>.h4-user,.av-h3.is-collapsed .m3-head>.h4-bell{pointer-events:none;visibility:hidden}

/* AI-Ассистент (16:773) */
.h4-ai{display:flex;flex-direction:column;gap:var(--space-base-m);padding:var(--space-base-m);border-radius:var(--radius-island);background:var(--theme-bg-island)}
.h4-ai__head{display:flex;align-items:flex-start;gap:var(--space-base-m)}
.h4-ai__head>.av-icon{flex:none;align-self:center}
.h4-ai__text{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--space-base-3-xs)}
.av-app .h4-ai__text p{margin:0;font-size:14px;line-height:18px;color:var(--theme-text-secondary)}
.av-app .h4-ai__text .h4-ai__title{font-size:17px;line-height:22px;font-weight:600;color:var(--theme-text-primary)}
.h4-ai__close{flex:none;display:grid;place-items:center;width:20px;height:20px;background:none;cursor:pointer}
/* The prompt field follows Coin Input «on island» states, like the other search fields. */
.h4-ai__field{--f-bg:var(--component-input-on-island-normal-bg);--f-stroke:var(--component-input-on-island-normal-stroke);--f-ph:var(--component-input-on-island-normal-placeholder-text);
 display:flex;align-items:center;height:44px;padding-left:10px;border:1px solid var(--f-stroke);border-radius:var(--radius-garden);background:var(--f-bg);transition:background-color .12s ease,border-color .12s ease}
.h4-ai__field:has(input:hover:not(:focus)){--f-bg:var(--component-input-on-island-hover-bg);--f-stroke:var(--component-input-on-island-hover-stroke);--f-ph:var(--component-input-on-island-hover-placeholder-text)}
.h4-ai__field:has(input:focus:placeholder-shown){--f-bg:var(--component-input-on-island-focused-empty-bg);--f-stroke:var(--component-input-on-island-focused-empty-stroke);--f-ph:var(--component-input-on-island-focused-empty-placeholder-text)}
.h4-ai__field:has(input:not(:focus):not(:placeholder-shown)){--f-bg:var(--component-input-on-island-filled-bg);--f-stroke:var(--component-input-on-island-filled-stroke)}
.h4-ai__field:has(input:focus:not(:placeholder-shown)){--f-bg:var(--component-input-on-island-focused-filled-bg);--f-stroke:var(--component-input-on-island-focused-filled-stroke)}
.h4-ai__field input{flex:1;min-width:0;height:100%;border:0;outline:0;background:transparent;font:inherit;font-size:17px;line-height:22px;color:var(--theme-text-primary);caret-color:var(--theme-icon-accent)}
.h4-ai__field input::placeholder{color:var(--f-ph);opacity:1}
.av-app .h4-ai__field input:focus-visible{outline:none}

/* Spacing of the v4 frame (Menu 15:262, updated): every row of the menu — tiles, search card, chips,
   «Найти билеты» — sits 8px apart; tiles are 8px apart with 4px between icon and label. The action icons
   stick 12px out of their cards, so the row keeps 12px from the button to the icons. */
/* 24px from the avatar row to the tiles (the header already leaves 26). */
.av-h3.is-v4 .m3-tiles-wrap{margin-top:calc(var(--space-base-xs) - var(--space-base-s))}
.av-h3.is-v4 .av-h3-menu{gap:var(--space-base-s)}
.av-h3.is-v4 .m3-tiles{gap:var(--space-base-s)}
.av-h3.is-v4 .m3-tile{gap:var(--space-base-2-xs)}
.av-h3.is-v4 .av-h3-actions{margin-top:var(--space-base-2-xs)}
/* Chips and the search button are islands (16) in the frame; the button is 48 high. */
.av-h3.is-v4 .av-h3-chips{gap:var(--space-base-s)}
.av-h3.is-v4 .av-h3-chip{border-radius:var(--radius-island)}
.av-h3.is-v4 :is(.av-find,.tr-find).cds-button{height:48px;border-radius:var(--radius-island)}
/* Flight Divider (265:6860): rounded 2px dashes, 11.93px long on a 23.87px step. The dashes live only
   between the side notches (10px each) and are spread with «space», so whole dashes always end at least
   ~6px before a notch on any screen width — they never run into it. Built in CSS so it fits any width. */
.av-h3.is-v4 .av-h3-route__divider,.av-h3.is-v4 .tr-route__divider{left:0;right:0;padding:0 10px;box-sizing:border-box;--a:5.97px;--b:17.9px;
 background:radial-gradient(circle at var(--a) 1px,var(--dash) .9px,#0000 1.1px) 0 0/23.87px 2px space,radial-gradient(circle at var(--b) 1px,var(--dash) .9px,#0000 1.1px) 0 0/23.87px 2px space,
  linear-gradient(90deg,#0000 var(--a),var(--dash) 0 var(--b),#0000 0) 0 0/23.87px 2px space;background-origin:content-box;background-clip:content-box}

/* «Войдите в профиль» prompt (guests, before booking or saving a favourite) */
.lp-body{display:flex;flex-direction:column;align-items:center;gap:var(--space-base-s);padding:var(--space-base-s) var(--space-base-l) 0;text-align:center}
.lp-body>.av-icon{margin-bottom:var(--space-base-s)}
.av-app .lp-body h2{margin:0;font-size:22.5px;line-height:28px;font-weight:600}
.av-app .lp-body p{margin:0;font-size:14px;line-height:18px;color:var(--theme-text-secondary);max-width:300px}
.lp-actions{display:flex;flex-direction:column;gap:var(--space-base-xs)}

/* Избранные */
.fv-screen{background:var(--theme-bg-ocean)}
.fv-body{flex:1;min-height:0;padding:var(--space-base-s) var(--space-base-l) 120px}
.fv-list{padding:0}
.fv-empty{display:flex;flex-direction:column;align-items:center;gap:var(--space-base-s);margin-top:120px;padding:0 var(--space-base-l);text-align:center}
.fv-empty>.av-icon{margin-bottom:var(--space-base-m)}
.av-app .fv-empty h2{margin:0;font-size:22.5px;line-height:28px;font-weight:600}
.av-app .fv-empty p{margin:0;font-size:14px;line-height:18px;color:var(--theme-text-secondary);max-width:280px}
.av-app .fv-btn{min-width:126px;margin-top:var(--space-base-m)}

/* Side notches of the Flight Divider (Ellipse 6/7): the two halves meet like rounded inner corners
   (radius 10) that pinch to a point at the dashed line, painted in the page colour as in Figma. */
.av-h3.is-v4 .av-h3-route{-webkit-mask:none;mask:none}
.av-h3.is-v4 .av-h3-route__divider::before,.av-h3.is-v4 .av-h3-route__divider::after{content:'';position:absolute;top:-10px;width:10px;height:22px;
 background:radial-gradient(circle at 100% 0,#0000 9.6px,var(--theme-bg-ocean) 10px) 0 0/10px 11px no-repeat,radial-gradient(circle at 100% 100%,#0000 9.6px,var(--theme-bg-ocean) 10px) 0 11px/10px 11px no-repeat}
.av-h3.is-v4 .av-h3-route__divider::before{left:0}
.av-h3.is-v4 .av-h3-route__divider::after{right:0;transform:scaleX(-1)}
/* Туры search card uses the same divider in v4 (instead of its plain 1px line). */
.tr-route__divider{display:none}
.av-h3.is-v4 .tr-route__divider{display:block}
.av-h3.is-v4 .tr-route::after{display:none}
.av-h3.is-v4 .tr-route__divider::before,.av-h3.is-v4 .tr-route__divider::after{content:'';position:absolute;top:-10px;width:10px;height:22px;
 background:radial-gradient(circle at 100% 0,#0000 9.6px,var(--theme-bg-ocean) 10px) 0 0/10px 11px no-repeat,radial-gradient(circle at 100% 100%,#0000 9.6px,var(--theme-bg-ocean) 10px) 0 11px/10px 11px no-repeat}
.av-h3.is-v4 .tr-route__divider::before{left:0}
.av-h3.is-v4 .tr-route__divider::after{right:0;transform:scaleX(-1)}

/* «Сервисы» v4 (14800:14282): five 48px tiles, 12.5/16 names on two lines. */
.is-v4 .av-h3-services__row{gap:12px}
.is-v4 .av-h3-service{min-width:0;gap:8px;font-size:12.5px;line-height:16px;white-space:pre-line}
.is-v4 .av-h3-service__tile{width:48px;height:48px;flex:none}
.is-v4 .av-h3-services{gap:16px}
/* Banners v4 (14804:61289 Топ направление, 14800:14402 Прямые рейсы, Azal): 24px corners, 12px inside. */
.is-v4 .av-h3-banner__top{border-radius:24px 24px 0 0}
.is-v4 .av-h3-banner__body{border-radius:24px;padding:12px}
.av-h3-banner__top--blue{background:linear-gradient(90deg,#579ef0,#07f);padding-bottom:40px;margin-bottom:-32px}
.av-h3-banner__top--blue .av-h3-banner__sub{font-size:14px;line-height:18px} /* Regular 10 */
.is-v4 .pr-widget{border-radius:24px}
/* Scrolling rows sit in a frame 12px inside their card: cards scroll under rounded edges instead of
   running to the card's border (top destinations, Azal promo, direct flights). */
.is-v4 :is(.av-h3-dest-row,.av-h3-direct-row){margin:0;padding:0;border-radius:12px;overflow-x:auto;overflow-y:hidden}
.is-v4 .av-h3-direct-row{border-radius:var(--radius-island)}
/* Azal: framed on the left only; on the right the cards still run off the edge as before. */
.is-v4 .pr-widget__row{border-radius:var(--radius-island) 0 0 var(--radius-island)}

/* Scrolled menu v4 (14806:62352): 44px icon buttons, 8px to the field, pill-shaped 44px field. */
.is-v4 .m3-compact{gap:var(--space-base-s);height:44px}
.is-v4 .m3-compact__icon{width:44px;height:44px}
.is-v4 .m3-compact__field{height:44px;border-radius:var(--radius-island);--m3-radius:var(--radius-island)}
/* Scrolled menu update (6520:10506): the four icons sit on a white island (16px corners, 2px sides); the
   island fades in with the field while the icons land, so the flying icons stay visible above it. */
.is-v4 .m3-compact__icons{position:relative;padding:0 2px}
.is-v4 .m3-compact__icons::before{content:'';position:absolute;inset:0;border-radius:var(--radius-island);background:var(--theme-bg-island);
 clip-path:inset(0 calc((1 - clamp(0,(var(--m3) - .3) / .35,1)) * 100%) 0 0 round var(--radius-island));opacity:clamp(0,(var(--m3) - .25) * 5,1)}
@media (prefers-reduced-motion: reduce){.is-v4 .m3-compact__icons::before{clip-path:none}}
.is-v4 .m3-compact__icon{z-index:1}
.is-v4 .m3-compact__icon:active{background:none}
/* Top destination photos: 12px corners (same as the row frame). */
.is-v4 .av-h3-dest__img{border-radius:12px}
/* Phones under 380px: a little less inside the field (6px edge, 6px gap) so «Какой вокзал?» / «Which station?» fit. */
@media (max-width:380px){.is-v4 .m3-compact__field{padding-left:var(--space-base-xs);gap:var(--space-base-xs)}}
/* Blinking text cursor in the main «where to» field and, per 6520:10506, in the scrolled menu's field: «Куда летите?» (avia, while empty) and the
   rail / hotel field («Куда поедем?», «Где ночуем?»). As in the Figma search component:
   a 2px accent caret like iOS (1px vanishes on scaled screens), 20px tall, in the gap just before the text so it takes no width). Fields are buttons that open the real input. */
/* The caret sits at the text box's start (1px out, so the 2px caret clears the first letter as in Figma) and takes no width.
   Drawn as a border, which browsers snap to whole pixels, so it is equally thick in every field.
   A caret blink is not motion, so it also blinks with «Reduce Motion» on. */
.is-v4 :is(.av-h3-route__text.has-caret,.m3-field>span:last-child,.m3-ticker>span:last-child){position:relative}
@keyframes h4-caret{0%,50%{opacity:1}50.01%,100%{opacity:0}}
.is-v4 :is(.av-h3-route__text.has-caret,.m3-field>span:last-child,.m3-ticker>span:last-child)::before{content:'';position:absolute;left:-1px;top:50%;width:0;height:20px;margin-top:-10px;border-left:2px solid var(--theme-icon-accent);animation:h4-caret 1.1s infinite}

/* «Выберите мечту» map banner (Figma 14814:62565): blue gradient, 24px corners, text on top and «Открыть» at the
   bottom; the globe itself is on the map screen it opens. */
.am-banner{display:flex;flex-direction:column;justify-content:space-between;gap:var(--space-base-l);position:relative;min-height:128px;isolation:isolate;padding:0 12px 12px;border-radius:24px;overflow:hidden;background:linear-gradient(90deg,#449bff,#0063d4);color:var(--theme-text-always-white)}
/* Figma 14835:87069: a dotted world map over the gradient (the export carries the same gradient, so it simply covers it). */
.am-banner::before{content:'';position:absolute;inset:0;z-index:-1;background:url(../assets/world/banner-map.png) center/cover no-repeat}
.am-banner__head{display:flex;align-items:center;gap:var(--space-base-s);padding-top:var(--space-base-s)}
.am-banner__head>div{flex:1;min-width:0}
.av-app .am-banner__title{font-weight:600;font-size:17px;line-height:22px}
.av-app .am-banner__sub{font-size:14px;line-height:18px}
.am-banner__open{width:100%;height:36px;text-align:center;border:0;border-radius:var(--radius-island);background:none;font:inherit;font-weight:600;font-size:15.5px;line-height:20px;color:var(--theme-text-always-white);cursor:pointer}
.am-banner__open:active{background:rgba(255,255,255,.12)}
/* AI-Ассистент: 24px card; the field has no stroke until it is focused (as the search fields). */
.h4-ai{border-radius:24px}
.h4-ai__field:not(:focus-within){--f-stroke:transparent}
.h4-ai__field{border-radius:12px}
.h4-ai__field--soon{width:100%;font:inherit;text-align:left;cursor:pointer}
.h4-ai__field--soon span{flex:1;min-width:0;font-size:17px;line-height:22px;color:var(--f-ph);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* 24px of air after the last block (the map banner) above the tab bar. */
.av-h3.is-v4 .av-h3-content{padding-bottom:24px}

/* Empty «Мои брони» / «Избранные» (4612:30458, 4625:33429): centred in the free space, illustration in the disabled icon grey. */
/* Pinned to the middle of the screen (not of the free space), so Мои брони (with its tabs) and Избранные put it at the same height. */
.av-emptystate{position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;align-items:center;gap:38px;padding:0 var(--space-base-l);text-align:center;pointer-events:none}
.av-emptystate__art{width:80px;height:80px;background:var(--theme-icon-disabled);-webkit-mask:var(--art) center/80px 80px no-repeat;mask:var(--art) center/80px 80px no-repeat}
.av-emptystate>div{display:flex;flex-direction:column;gap:var(--space-base-s)}
.av-app .av-emptystate h2{margin:0;font-size:17px;line-height:22px;font-weight:600;color:var(--theme-text-primary)}
.av-app .av-emptystate p{margin:0;max-width:260px;font-size:14px;line-height:18px;color:var(--theme-text-secondary)}
/* The button hangs 24px under the hint without changing the block's height, so the art and text stay where they are on Мои брони too. */
.av-emptystate__action{position:absolute;left:var(--space-base-l);right:var(--space-base-l);top:calc(100% + 24px);pointer-events:auto}
.av-emptystate__action .av-button{height:48px;border-radius:16px}
/* Scrolled menu: the header background has 24px corners at the bottom, so the content passes under a rounded edge. */
/* Shadow: Coin Shadow/PanelTop (16px blur, Effect/ShadowToast colour) mirrored to fall downward (+4px instead
   of −4px) since this panel sits at the top; it fades in as the menu collapses and replaces the 1px line. */
.is-v4 .m3-head{border-radius:0 0 24px 24px;box-shadow:0 4px 16px color-mix(in srgb,var(--theme-effect-shadow-toast) calc(var(--m3) * 100%),transparent)}
/* Scrolled menu field: its text clips overflow, so the caret starts at 0 (inside the text box) instead of −1px. */
.is-v4 .m3-ticker>span:last-child::before{left:0}
