/* Veylo 0.5.1: contextual costs, accessible icon details and compact chat. */
@layer components {
 .cost-type-picker{display:grid;grid-template-columns:1fr 1fr;gap:12px}
 .cost-type-option{display:flex;align-items:center;gap:12px;min-height:64px;padding:16px;text-align:start;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text);transition:background .16s,border-color .16s}
 .cost-type-option>.icon:first-child{color:var(--brand);width:22px;height:22px}.cost-type-option>.icon:last-child{margin-inline-start:auto;width:16px;height:16px}
 .cost-type-option:hover{background:var(--surface2);border-color:var(--brand)}
 .cost-form{display:flex;flex-direction:column;gap:18px}.cost-form-heading{display:flex;align-items:center;gap:9px;font-size:.82rem;color:var(--muted)}
 .cost-form-heading>.icon{color:var(--brand)}.cost-context{margin-inline-start:auto;overflow-wrap:anywhere}
 .cost-form input,.cost-form select,.cost-form textarea{min-width:0;max-width:100%;font-size:1rem}
 .cost-live-total{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:14px 16px;background:var(--surface2);border-radius:11px;color:var(--muted);font-size:.85rem}
 .cost-live-total strong{color:var(--text);font-size:1.12rem;text-align:end;overflow-wrap:anywhere}
 .cost-section{border-top:1px solid var(--line);padding-top:3px}.cost-section>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;min-height:48px;font-size:.9rem;font-weight:600;color:var(--text)}
 .cost-section>summary::-webkit-details-marker{display:none}.cost-section>summary>.icon{width:17px;height:17px;color:var(--muted);transition:transform .18s}
 .cost-section[open]>summary>.icon{transform:rotate(90deg)}.cost-section-body{padding-block:10px;display:flex;flex-direction:column;gap:16px}
 .cost-section-body>.field-help{margin:0}.cost-section-label{font-size:.85rem;font-weight:600}.cost-check{display:flex;flex-direction:row;align-items:center;gap:8px;min-height:44px;font-size:.85rem;font-weight:500}
 .cost-check input{width:18px;height:18px;min-height:0;flex-shrink:0;accent-color:var(--brand)}.cost-check>.icon{width:19px;height:19px;color:var(--text)}
 .cost-baggage>div{display:flex;gap:6px 18px;flex-wrap:wrap;margin-top:8px}.cost-baggage{border-top:1px solid var(--line);padding-top:16px}
 .flight-times{display:grid;grid-template-columns:1fr 1fr;gap:16px}.flight-times fieldset{margin:0;padding:12px;border:1px solid var(--line);border-radius:12px;min-width:0;display:grid;gap:14px}
 .flight-times legend{padding-inline:5px;font-size:.88rem;font-weight:600}.flight-times legend .icon{width:16px;height:16px;vertical-align:middle;margin-inline-end:6px}
 .cost-time-help{font-size:.8rem;line-height:1.5}.cost-fx{border:1px solid var(--line);border-radius:12px;padding:14px}.cost-fx[hidden],[data-room-quantity][hidden]{display:none}
 .cost-fx .field-help{display:block;margin-top:8px}
 .detail-hint{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;min-width:40px;padding:8px;border:1px solid var(--line);border-radius:10px;background:var(--surface2);color:var(--text);text-align:start;font-size:.78rem;max-width:100%}
 .detail-hint>.icon{width:18px;height:18px;flex-shrink:0;color:var(--brand)}.detail-hint>span:not(.detail-tooltip){overflow-wrap:anywhere;min-width:0}
 .detail-tooltip{position:absolute;z-index:60;inset-inline-start:0;bottom:calc(100% + 7px);display:none;max-width:min(260px,calc(100vw - 64px));width:max-content;padding:8px 10px;background:var(--text);color:var(--bg);box-shadow:var(--shadow);border-radius:8px;font-size:.8rem;line-height:1.4;pointer-events:none;white-space:normal}
 .detail-hint:is(:hover,:focus-visible,[data-show-hint])>.detail-tooltip{display:block}.detail-hint:hover{border-color:var(--brand)}
 .baggage-icons,.flight-detail-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-block:10px}
 .flight-detail-row:empty{display:none}.detail-hint:focus-visible,.cost-type-option:focus-visible,.cost-section>summary:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
}
@layer responsive {
 /* Scope the empty-state art to its own glyph, not the Add button's glyph. */
 .empty{padding:28px 22px}.empty>.icon{width:28px;height:28px}.empty .btn{min-height:44px;padding:11px 18px}
 .btn>.icon{width:18px;height:18px;color:inherit;stroke:currentColor;margin:0}.empty .btn>.icon{color:inherit;width:18px;height:18px;margin:0}
 /* All confirmation and message alerts use one independent overlay stack. */
 .notification-alerts{top:calc(12px + env(safe-area-inset-top));inset-inline-start:50%;inset-inline-end:auto;transform:translateX(-50%);z-index:2400;width:min(420px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow-y:auto;gap:8px;scrollbar-width:thin}
 [dir=rtl] .notification-alerts{transform:translateX(50%)}
 .notification-alerts[popover]{margin:0;padding:0;border:0;background:transparent;color:inherit;bottom:auto}
 .notification-alerts[popover]::backdrop{background:transparent;pointer-events:none}
 #modal .notification-alerts.notification-inline{position:sticky;inset:auto;bottom:0;transform:none;width:auto;max-height:40dvh;margin:8px;overflow-y:auto}
 .notification-alerts .toast{position:relative;inset:auto;bottom:auto;max-width:none;width:100%;padding:14px 16px;border:1px solid var(--line);margin:0;pointer-events:auto;animation:notice-arrive .18s ease;overflow-wrap:anywhere;min-width:0;flex-shrink:0}
 .notification-alerts .toast>.icon{flex-shrink:0;width:18px;height:18px}.notification-alerts .toast>span{min-width:0}
 .notification-alerts .notification-toast{animation:notice-arrive .18s ease}
 @keyframes notice-arrive{from{opacity:0;translate:0 -8px}to{opacity:1;translate:0 0}}
 .floating-chat-window{width:min(390px,calc(100vw - 28px));height:min(550px,calc(100dvh - 48px));max-height:calc(var(--chat-vh,100dvh) - 32px);border-radius:20px}
 .floating-chat-window .live-chat{padding:16px;gap:0;min-height:0}.floating-chat-window .chat-heading{padding-bottom:12px;gap:10px}
 .floating-chat-window .chat-heading h3{font-size:1rem}.chat-stream-label{padding-block:12px;font-size:.77rem;overflow-wrap:anywhere;gap:8px}
 .floating-chat-window .chat-messages{gap:14px;padding:4px 2px 12px;min-height:65px;flex:1;max-height:none}
 .chat-bubble{padding:12px 13px;border-radius:14px}.chat-message-meta{align-items:center;gap:8px}.chat-message-meta strong{font-size:.83rem;overflow-wrap:anywhere}.chat-message-meta time{font-size:.7rem}
 .chat-bubble>p{font-size:.95rem;line-height:1.55;margin-top:8px}.chat-message-bottom{margin-top:12px;gap:9px;align-items:center;flex-wrap:wrap}
 .message-topic{min-height:34px;line-height:1.5;padding:6px 8px;max-width:100%;font-size:.72rem;flex:1 1 145px}.message-subtopic{font-size:.72rem;margin-top:2px}
 .chat-message-actions{margin-inline-start:auto;gap:3px}.chat-message-actions .chat-tool{height:34px;width:34px;min-height:34px;min-width:34px;background:transparent;border-radius:9px}
 .chat-message-actions .chat-tool:hover,.chat-message-actions .chat-tool:focus-visible{background:var(--surface);color:var(--text)}
 .chat-message-actions .chat-tool[data-chat-action=delete-message]:hover{color:var(--danger)}
 .floating-chat-window .chat-compose{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:10px;padding:12px;margin-top:6px;border-radius:15px;background:var(--surface2);flex-shrink:0}
 .floating-chat-window .chat-input-label{margin:0;min-width:0;grid-column:1;grid-row:auto}
 .floating-chat-window .chat-input-label textarea{width:100%;min-height:76px;max-height:140px;padding:8px 3px;border:0;background:transparent;resize:none;font-size:1rem;font-weight:400;line-height:1.45;outline:0;box-shadow:none}
 .floating-chat-window .chat-input-label textarea:focus{outline:none;box-shadow:none}.floating-chat-window .chat-compose:focus-within{border-color:var(--brand);box-shadow:0 0 0 1px var(--brand)}
 .floating-chat-window .chat-compose-footer{grid-column:2;grid-row:1;align-self:end;margin:0;min-width:0;width:44px}
 .floating-chat-window .chat-send{display:grid;place-items:center;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;max-width:44px!important;max-height:44px!important;padding:0!important;border-radius:12px!important;overflow:hidden;white-space:nowrap;color:var(--surface);flex:0 0 44px}
 .floating-chat-window .chat-send>.icon{width:21px;height:21px;color:inherit;stroke:currentColor}.chat-send[aria-busy=true]{opacity:1;cursor:progress}
 .send-spinner{animation:send-spin .8s linear infinite}@keyframes send-spin{to{transform:rotate(360deg)}}
 .floating-chat-window .chat-routing{grid-column:1/-1;grid-row:auto;margin:0;padding:10px 0 0;border-color:var(--line);align-items:center;gap:10px}
 .floating-chat-window .chat-to{gap:5px;flex:1 1 180px}.composer-destination{font-size:.72rem;line-height:1.5;margin-bottom:2px}
 .topic-chip{font-size:.75rem;min-height:27px;line-height:1.4}.topic-sub{font-size:.74rem;white-space:normal;overflow-wrap:anywhere;max-width:100%}
 .floating-chat-window .chat-routing .topic-select-button{padding:6px 8px!important;font-size:.74rem!important;min-height:36px;flex-shrink:0;margin-inline-start:auto}
 .chat-typing{padding-block:4px;min-height:25px;font-size:.75rem}.chat-quote{font-size:.8rem}.chat-replying{margin:0;grid-row:1;min-width:0}
 .floating-chat-window .chat-replying:not([hidden])~.chat-input-label,.floating-chat-window .chat-replying:not([hidden])~.chat-compose-footer{grid-row:2}
 .chat-error:not(:empty){font-size:.8rem;line-height:1.4;overflow-wrap:anywhere}.chat-tool:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
 @media(max-width:700px){
  .cost-type-picker{gap:9px}.cost-type-option{font-size:.88rem;padding:12px;gap:8px}.cost-type-option>.icon:first-child{width:20px;height:20px}
  .flight-times{grid-template-columns:1fr}.cost-baggage>div{display:grid;grid-template-columns:1fr}.cost-section-body .form-grid{grid-template-columns:1fr}.cost-form>.form-grid{grid-template-columns:1fr 1fr}
  .cost-context{max-width:50%}.cost-live-total{align-items:flex-start}.cost-live-total strong{font-size:1rem}
  .floating-chat-window{inset:auto 10px calc(80px + env(safe-area-inset-bottom));width:calc(100vw - 20px);height:min(550px,calc(100dvh - 170px));max-height:calc(var(--chat-vh,100dvh) - 24px);bottom:max(calc(80px + env(safe-area-inset-bottom)),calc(var(--chat-keyboard-inset,0px) + 10px))}
  .floating-chat-window .live-chat{padding:14px}.floating-chat-window .chat-compose{padding:10px;gap:8px}.floating-chat-window .chat-routing{gap:7px}
  .chat-message-actions .chat-tool{width:40px;height:40px;min-width:40px;min-height:40px}.detail-hint{min-height:44px;min-width:44px}.cost-form input[type=datetime-local]{width:100%}
  .chat-message-meta{gap:6px}.floating-chat-window .chat-to{flex-basis:170px}.chat-stream-label{padding-block:10px}
 }
 @media(max-height:520px){.floating-chat-window{height:calc(100dvh - 24px);max-height:calc(var(--chat-vh,100dvh) - 20px);bottom:max(10px,calc(var(--chat-keyboard-inset,0px) + 10px))}.floating-chat-window .chat-input-label textarea{min-height:48px}.floating-chat-window .live-chat{padding:10px}.chat-stream-label{padding-block:6px}.chat-typing{min-height:18px;padding:0}}
 @media(prefers-reduced-motion:reduce){.send-spinner{animation:none}.notification-alerts .toast,.notification-alerts .notification-toast{animation:none}}
 :root[data-motion=reduced] .send-spinner,:root[data-motion=reduced] .notification-alerts .toast,:root[data-motion=reduced] .notification-alerts .notification-toast{animation:none}
}
@layer responsive{@media(max-width:700px){.main .tabs{margin-inline:-16px;padding-inline:16px}}}

/* Compact conversation layout: message context near its time, a single routing chip. */
@layer responsive {
 #veylo-chat-window .chat-bubble{padding:11px 13px 13px;max-width:98%;width:100%;border-radius:14px}
 #veylo-chat-window .chat-message-meta{display:flex;flex-wrap:nowrap;align-items:center;gap:10px;min-width:0;min-height:26px}
 #veylo-chat-window .chat-message-meta>strong{min-width:0;flex:1;font-size:.82rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .chat-message-stamp{display:inline-flex;align-items:center;justify-content:flex-end;gap:5px;flex-shrink:0;margin-inline-start:auto}
 #veylo-chat-window .chat-message-stamp time{margin:0;white-space:nowrap;font-size:max(11px,.69rem);line-height:1.4;color:var(--muted)}
 #veylo-chat-window .chat-message-delete{width:25px;min-width:0;max-width:0;height:25px;min-height:25px;padding:0;overflow:hidden;opacity:0;pointer-events:none;margin-inline-start:-5px;border-radius:7px;transition:opacity .13s,max-width .13s,margin .13s}
 #veylo-chat-window .chat-message-delete .icon{width:13px;height:13px}
 #veylo-chat-window .chat-message:is(:hover,:focus-within) .chat-message-delete{max-width:25px;opacity:1;pointer-events:auto;margin-inline-start:0}
 #veylo-chat-window .chat-message-delete:hover{color:var(--danger);background:var(--surface)}
 .chat-message-context{display:flex;justify-content:flex-end;align-items:center;gap:5px;min-width:0;margin:1px 0 5px}
 #veylo-chat-window .chat-inline-reply{width:24px;min-width:24px;height:24px;min-height:24px;padding:0;background:none;border-radius:6px;opacity:.65}
 #veylo-chat-window .chat-inline-reply .icon{width:13px;height:13px}
 #veylo-chat-window .chat-inline-reply:is(:hover,:focus-visible){opacity:1;background:var(--surface)}
 #veylo-chat-window .message-topic{display:inline-flex;flex:0 1 auto;align-items:center;min-width:0;max-width:calc(100% - 29px);min-height:24px;gap:4px;padding:2px 5px;border:0;border-radius:5px;background:color-mix(in srgb,var(--topic) 7%,transparent);font-size:max(11px,.69rem);line-height:1.45;text-align:end}
 #veylo-chat-window .message-topic>.icon{width:12px;height:12px;flex-shrink:0;margin:0}
 #veylo-chat-window .message-topic:is(:hover,:focus-visible){background:color-mix(in srgb,var(--topic) 15%,transparent)}
 .topic-trail{display:inline-flex;align-items:center;justify-content:inherit;gap:3px;min-width:0;flex-wrap:wrap}
 #veylo-chat-window .message-subtopic{display:inline;min-width:0;max-width:100%;margin:0;font-size:inherit;color:inherit;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 .topic-place{max-width:12em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 #veylo-chat-window .chat-bubble>p{margin-top:3px;font-size:.96rem;line-height:1.6;overflow-wrap:anywhere}
 #veylo-chat-window .chat-messages{gap:13px;padding-block:4px 12px}
 .chat-day-divider{display:flex;align-items:center;justify-content:center;gap:10px;flex-shrink:0;margin-block:5px;color:var(--muted);font-size:max(11px,.71rem);line-height:1.5;text-align:center}
 .chat-day-divider::before,.chat-day-divider::after{content:'';height:1px;background:var(--line);flex:1;max-width:42px}
 .chat-day-divider time{background:var(--surface2);padding:3px 9px;border-radius:12px}
 #veylo-chat-window .chat-compose{display:flex;flex-direction:column;gap:6px;padding:10px 12px;margin-top:4px;border:1px solid var(--line);border-radius:15px;background:var(--surface2)}
 #veylo-chat-window .chat-input-label{width:100%;min-width:0;margin:0}
 #veylo-chat-window .chat-input-label textarea{display:block;width:100%;height:40px;min-height:40px;max-height:136px;padding:8px 1px;border:0;border-radius:0;background:none;box-shadow:none;outline:0;resize:none!important;overflow-x:hidden;overflow-y:hidden;font-size:1rem;font-weight:400;line-height:1.5;scrollbar-width:thin}
 #veylo-chat-window .chat-input-label textarea::placeholder{color:var(--muted);opacity:1;font-weight:400}
 #veylo-chat-window .chat-input-label textarea:focus{outline:none;box-shadow:none}
 #veylo-chat-window .chat-compose-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
 #veylo-chat-window .chat-routing{display:flex;flex:1;min-width:0;border:0;padding:0;margin:0;gap:4px;align-items:center}
 #veylo-chat-window .chat-to{display:flex;flex:1;min-width:0;gap:3px;flex-wrap:nowrap}
 #veylo-chat-window .composer-topic{display:inline-flex;align-items:center;flex:0 1 auto;min-height:32px;min-width:0;max-width:100%;padding:5px 7px;border:1px solid color-mix(in srgb,var(--topic) 18%,transparent);border-radius:9px;background:color-mix(in srgb,var(--topic) 8%,transparent);font-size:.75rem;line-height:1.45;gap:5px;text-align:start;cursor:pointer}
 #veylo-chat-window .composer-topic:hover{background:color-mix(in srgb,var(--topic) 16%,transparent)}
 #veylo-chat-window .composer-topic:focus-visible,#veylo-chat-window .message-topic:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
 #veylo-chat-window .composer-topic>.icon{width:14px;height:14px;flex-shrink:0}
 #veylo-chat-window .topic-picker-chevron{width:12px!important;height:12px!important;transform:rotate(90deg);opacity:.7}
 #veylo-chat-window .chat-to>[data-chat-action=automatic-topic]{width:28px;min-width:28px;height:32px;min-height:32px}
 #veylo-chat-window .chat-to>[data-chat-action=automatic-topic] .icon{width:13px;height:13px}
 #veylo-chat-window .chat-compose-footer{display:flex;align-self:center;flex-shrink:0;width:44px;margin:0}
 #veylo-chat-window .chat-replying{margin:0 0 2px;flex-shrink:0}
 #veylo-chat-window .chat-typing{min-height:20px;padding-block:1px;font-size:.75rem}
 @media(hover:none),(pointer:coarse){
  #veylo-chat-window .chat-message-delete{width:36px;min-width:36px;max-width:36px;height:36px;min-height:36px;opacity:.75;pointer-events:auto;margin-inline-start:0}
  #veylo-chat-window .chat-inline-reply{width:32px;min-width:32px;height:32px;min-height:32px}
  #veylo-chat-window .message-topic{min-height:32px}
  #veylo-chat-window .composer-topic{min-height:40px}
 }
 @media(max-height:520px){#veylo-chat-window .chat-input-label textarea{min-height:36px;max-height:80px}#veylo-chat-window .chat-compose{padding:6px 10px;gap:3px}}
 @media(prefers-reduced-motion:reduce){#veylo-chat-window .chat-message-delete{transition:none}}
}
