/* Carrrven CMS chat v2.1 — short viewport maintenance footer follows document flow. */
#carrrven-chat-root{
  --cvchat-bg:#141817;--cvchat-surface:#202624;--cvchat-border:#555b56;
  --cvchat-text:#f3f0e9;--cvchat-muted:#c6c6bf;--cvchat-accent:#c7ac75;
  position:fixed;inset:auto 24px var(--cvchat-bottom,24px) auto;z-index:110;
  font-family:'Hanken Grotesk',sans-serif;color:var(--cvchat-text);
}
#carrrven-chat-root *,#carrrven-chat-root *::before,#carrrven-chat-root *::after{box-sizing:border-box}
#carrrven-chat-root button,#carrrven-chat-root input{font:inherit}
#carrrven-chat-root button{cursor:pointer}
#carrrven-chat-root button:disabled{cursor:wait;opacity:.7}
#carrrven-chat-root button:focus-visible,#carrrven-chat-root input:focus-visible{
  outline:2px solid var(--cvchat-accent);outline-offset:3px;
}
#carrrven-chat-root .cvchat-launch{
  position:relative;display:grid;place-items:center;width:56px;height:56px;min-height:56px;padding:0;border:1px solid var(--cvchat-accent);
  border-radius:50%;background:var(--cvchat-bg);color:var(--cvchat-text);
  font-size:15px;font-weight:600;
  box-shadow:0 4px 16px rgba(0,0,0,.3);
}
#carrrven-chat-root .cvchat-panel{
  position:absolute;right:0;bottom:64px;width:min(410px,calc(100vw - 32px));
  max-height:min(680px,calc(100dvh - var(--cvchat-bottom,24px) - 72px));overflow:auto;
  padding:20px;border:1px solid var(--cvchat-border);border-radius:8px;
  background:var(--cvchat-bg);box-shadow:0 8px 24px rgba(0,0,0,.36);
}
#carrrven-chat-root .cvchat-panel[hidden],#carrrven-chat-root [hidden]{display:none}
#carrrven-chat-root .cvchat-header{display:flex;align-items:center;justify-content:space-between;gap:12px}
#carrrven-chat-root .cvchat-title{
  margin:0;color:var(--cvchat-text);font:600 24px/1.2 'Playfair Display',Georgia,serif;
}
#carrrven-chat-root .cvchat-close{
  display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;
  padding:0;border:1px solid transparent;border-radius:6px;background:transparent;
  color:var(--cvchat-text);font-size:28px;line-height:1;
}
#carrrven-chat-root .cvchat-intro{
  margin:8px 0 14px;color:var(--cvchat-muted);font-size:14px;line-height:1.5;
}
#carrrven-chat-root .cvchat-faq{display:flex;flex-direction:column;gap:8px}
#carrrven-chat-root .cvchat-faq-choice{
  min-height:44px;width:100%;padding:10px 12px;border:1px solid var(--cvchat-border);
  border-radius:6px;background:var(--cvchat-surface);
  color:var(--cvchat-text);text-align:left;font-size:14px;line-height:1.45;
}
#carrrven-chat-root .cvchat-log{
  display:flex;flex-direction:column;gap:8px;max-height:160px;
  overflow:auto;margin:12px 0;
}
#carrrven-chat-root .cvchat-log:empty{display:none}
#carrrven-chat-root .cvchat-message{
  margin:0;max-width:95%;padding:10px 12px;border-radius:6px;
  background:var(--cvchat-surface);color:var(--cvchat-text);
  font-size:13px;line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap;
}
#carrrven-chat-root .cvchat-visitor{align-self:flex-end;background:#383833}
#carrrven-chat-root .cvchat-agent{align-self:flex-start}
#carrrven-chat-root .cvchat-question-form{margin-top:14px}
#carrrven-chat-root .cvchat-field{
  display:flex;flex-direction:column;gap:6px;width:100%;min-width:0;
}
#carrrven-chat-root .cvchat-label{font-size:13px;color:var(--cvchat-muted)}
#carrrven-chat-root .cvchat-input-row{display:flex;gap:8px}
#carrrven-chat-root .cvchat-input{
  width:100%;min-width:0;min-height:44px;padding:9px 10px;
  border:1px solid var(--cvchat-border);border-radius:6px;
  background:var(--cvchat-surface);color:var(--cvchat-text);font-size:14px;
}
#carrrven-chat-root .cvchat-primary{
  min-height:44px;padding:8px 14px;border:1px solid var(--cvchat-accent);
  border-radius:6px;background:var(--cvchat-accent);color:#171717;
  font-size:14px;font-weight:650;white-space:nowrap;
}
#carrrven-chat-root .cvchat-link{
  display:block;min-height:44px;padding:8px 0;margin-top:8px;border:0;
  background:transparent;color:var(--cvchat-accent);font-size:14px;text-align:left;
  text-decoration:underline;text-underline-offset:3px;
}
#carrrven-chat-root .cvchat-contact-form{
  display:flex;flex-direction:column;gap:12px;padding-top:14px;margin-top:6px;
  border-top:1px solid var(--cvchat-border);
}
#carrrven-chat-root .cvchat-consent{
  display:flex;align-items:flex-start;gap:10px;
  color:var(--cvchat-muted);font-size:13px;line-height:1.5;
}
#carrrven-chat-root .cvchat-checkbox{
  width:20px;height:20px;margin:0;flex:0 0 20px;accent-color:var(--cvchat-accent);
}
#carrrven-chat-root .cvchat-error{margin:8px 0 0;color:#ffb6ae;font-size:13px;line-height:1.4}
#carrrven-chat-root .cvchat-success{margin:12px 0;color:var(--cvchat-text);font-size:14px;line-height:1.5}
@media(max-width:480px){
  #carrrven-chat-root{right:12px;bottom:max(var(--cvchat-bottom,12px),env(safe-area-inset-bottom))}
  #carrrven-chat-root .cvchat-panel{
    width:calc(100vw - 24px);bottom:64px;padding:16px;
    max-height:calc(100dvh - var(--cvchat-bottom,12px) - 72px);
  }
  #carrrven-chat-root .cvchat-primary{padding-inline:10px}
}
#carrrven-chat-root .cvchat-launch svg{display:block;width:25px;height:25px}
#carrrven-chat-root .cvchat-unread{position:absolute;top:-6px;right:-6px;min-width:20px;height:20px;padding:0 4px;display:grid;place-items:center;border:2px solid var(--cvchat-bg);border-radius:10px;background:var(--cvchat-accent);color:#171717;font-size:11px;font-weight:700;line-height:1}
#carrrven-chat-root .cvchat-unread[hidden]{display:none}

#carrrven-chat-root[hidden]{display:none}
#carrrven-chat-root .cvchat-message:focus-visible{outline:2px solid var(--cvchat-accent)}
@media (prefers-reduced-motion: reduce){#carrrven-chat-root *{scroll-behavior:auto!important}}

/* Maintenance-only: short viewports cannot fit a fixed 274px footer card beside chat.
   Keep the footer in document flow instead of covering visitor controls. */
@media(max-height:500px){
  body:has(.maintenance-screen__background) .fixed.bottom-6.right-6{
    position:static!important;
    margin:16px auto!important;
    width:min(420px,calc(100vw - 32px))!important;
    max-height:none!important;
  }
}
