.premium-site.ayla-chat-page {
  background: #FAF8F4;
  min-height: 100vh;
}

.ayla-chat-page .site-header {
  position: sticky;
  top: 0;
}

.ayla-chat-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 28px 54px;
  display: grid;
  grid-template-columns: 360px minmax(0,1fr);
  gap: 26px;
  align-items: stretch;
}

.ayla-intro-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(31,138,138,.17);
  border-radius: 28px;
  padding: 30px 28px;
  background:
    radial-gradient(circle at 90% 8%,rgba(200,169,107,.14),transparent 28%),
    radial-gradient(circle at calc(100% + 145px) calc(100% + 150px), transparent 134px, rgba(31,138,138,.14) 135px, rgba(31,138,138,.14) 136px, transparent 137px),
    linear-gradient(160deg,#F3F9F7 0%,#FBF9F5 61%,#F5EFE3 100%);
}

.ayla-intro-card:after {
  display: none;
}

.ayla-intro-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 17px;
  margin-bottom: 28px;
}

.ayla-intro-brand img {
  width: 92px;
  height: 92px;
  flex: none;
}

.ayla-intro-wordmark {
  font-family: "Cormorant Garamond",Georgia,serif;
  font-size: 42px;
  font-weight: 600;
  letter-spacing: .12em;
  line-height: .9;
  color: #17324D;
}

.ayla-intro-brand small {
  display: block;
  margin-top: 8px;
  color: #176D70;
  font: 700 10px/1.4 Inter,sans-serif;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.ayla-intro-card .eyeline {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #176D70;
  font: 800 10px/1 Inter,sans-serif;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.ayla-intro-card .eyeline:before {
  content: "";
  width: 30px;
  height: 1px;
  background: #C8A96B;
}

.ayla-intro-card h1 {
  position: relative;
  z-index: 1;
  font-family: "Cormorant Garamond",Georgia,serif;
  color: #17324D;
  font-size: 43px;
  line-height: .96;
  letter-spacing: -.035em;
  font-weight: 600;
  margin: 0 0 16px;
}

.ayla-intro-card>p {
  position: relative;
  z-index: 1;
  color: #5F6D78;
  font: 400 14.5px/1.72 Inter,sans-serif;
  margin: 0;
}

.ayla-starter-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2px !important;
  margin: 10px 0 0 !important;
}

.ayla-starter {
  display: flex;
  align-items: center;
  min-height: 0 !important;
  gap: 12px !important;
  padding: 4px 0 !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 14px;
  background: transparent !important;
  color: #354A5B;
  font: 500 12.5px/1.35 Inter,sans-serif;
}

.ayla-starter svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #1F8A8A;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.ayla-cv-card {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(23,50,77,.09);
}

.ayla-cv-card strong {
  display: block;
  color: #17324D;
  font: 600 14px/1.35 Inter,sans-serif;
}

.ayla-cv-card p {
  color: #6A7781;
  font: 400 12px/1.55 Inter,sans-serif;
  margin: 5px 0 12px;
}

.ayla-cv-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #17324D;
  background: #fff;
  border: 1px solid rgba(23,50,77,.15);
  border-radius: 999px;
  padding: 10px 14px;
  font: 650 12px/1 Inter,sans-serif;
  transition: .18s ease;
}

.ayla-cv-button:hover {
  border-color: rgba(31,138,138,.35);
  background: rgba(31,138,138,.055);
  color: #176D70;
}

.ayla-chat-card {
  min-width: 0;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(23,50,77,.11);
  background: #fff;
  display: flex;
  flex-direction: column;
}

.ayla-chat-topbar {
  min-height: 68px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  border-bottom: 1px solid #E7E4DD;
  background: #FCFBF8;
}

.ayla-lab-link {
  color: #176D70;
  text-decoration: none;
  font: 650 11px/1 Inter,sans-serif;
  border: 1px solid rgba(31,138,138,.20);
  border-radius: 999px;
  padding: 9px 12px;
  background: #fff;
}

.ayla-lab-link:hover {
  background: #F1F8F6;
}

.ayla-chat-mount {
  height: 680px;
  min-height: 600px;
  background: #FCFBF8;
  position: relative;
}

#n8n-chat {
  height: 100%;
  width: 100%;
}

.ayla-chat-fallback {
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-top: 1px solid #ECE9E2;
  background: #FCFBF8;
  color: #74808A;
  font: 400 10.5px/1.45 Inter,sans-serif;
}

.ayla-chat-fallback a {
  color: #176D70;
  font-weight: 650;
  text-decoration: none;
}

/* =========================================================
   N8N CHAT THEME
   ========================================================= */
.ayla-chat-page {
  --chat--color-primary: #1F8A8A;
  --chat--color-primary-shade-50: #1B7C7D;
  --chat--color-primary-shade-100: #176D70;
  --chat--color-secondary: #C8A96B;
  --chat--color-secondary-shade-50: #B99A5D;
  --chat--color-white: #FFFFFF;
  --chat--color-light: #FBFAF7;
  --chat--color-light-shade-50: #F5F3EE;
  --chat--color-light-shade-100: #E9E5DD;
  --chat--color-medium: #D9DFDE;
  --chat--color-dark: #17324D;
  --chat--color-disabled: #98A2AA;
  --chat--color-typing: #61717C;
  --chat--spacing: 1rem;
  --chat--border-radius: 16px;
  --chat--transition-duration: .16s;
  --chat--window--width: 100%;
  --chat--window--height: 100%;
  --chat--header-height: 0px;
  --chat--header--padding: 0;
  --chat--header--background: #FBFAF7;
  --chat--header--color: #17324D;
  --chat--header--border-top: none;
  --chat--header--border-bottom: none;
  --chat--heading--font-size: 1.35rem;
  --chat--subtitle--font-size: .85rem;
  --chat--message--font-size: .93rem;
  --chat--message--padding: .9rem 1rem;
  --chat--message--border-radius: 17px;
  --chat--message-line-height: 1.55;
  --chat--message--bot--background: #FFFFFF;
  --chat--message--bot--color: #344756;
  --chat--message--bot--border: 1px solid #E9E6DF;
  --chat--message--user--background: #EAF5F3;
  --chat--message--user--color: #17324D;
  --chat--message--user--border: 1px solid #D4E9E5;
  --chat--message--pre--background: #F1F4F3;
}

.ayla-chat-page #n8n-chat,
.ayla-chat-page #n8n-chat * {
  font-family: Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
}

.ayla-chat-page #n8n-chat .chat-layout {
  background: #FBFAF7 !important;
}

.ayla-chat-page #n8n-chat .chat-header {
  display: none !important;
}

.ayla-chat-page #n8n-chat .chat-window-wrapper {
  height: 100% !important;
  width: 100% !important;
  max-width: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #FBFAF7 !important;
}

.ayla-chat-page #n8n-chat .chat-window {
  height: 100% !important;
  width: 100% !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #FBFAF7 !important;
}

.ayla-chat-page #n8n-chat .chat-layout,
.ayla-chat-page #n8n-chat .chat-window-wrapper,
.ayla-chat-page #n8n-chat .chat-window,
.ayla-chat-page #n8n-chat .chat-body,
.ayla-chat-page #n8n-chat .chat-messages-list {
  background: #FCFBF8 !important;
}

@media (max-width:980px) {
  .ayla-chat-shell {
    grid-template-columns: 1fr;
    padding-top: 24px;
  }

  .ayla-intro-card {
    padding: 25px 24px;
  }

  .ayla-intro-card h1 {
    font-size: 39px;
  }

  .ayla-starter-list {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .ayla-chat-mount {
    height: 660px;
  }
}

@media (max-width:650px) {
  .ayla-chat-shell {
    padding: 18px 14px 34px;
    gap: 16px;
  }

  .ayla-intro-brand img {
    width: 76px;
    height: 76px;
  }

  .ayla-intro-wordmark {
    font-size: 35px;
  }

  .ayla-intro-card h1 {
    font-size: 34px;
  }

  .ayla-starter-list {
    grid-template-columns: 1fr;
  }

  .ayla-chat-card {
    border-radius: 20px;
  }

  .ayla-chat-topbar {
    padding: 12px 14px;
    min-height: 58px;
  }

  .ayla-lab-link {
    display: none;
  }

  .ayla-chat-mount {
    height: 640px;
    min-height: 580px;
  }

}

.ayla-chat-page .ayla-chat-shell {
  padding-top: 24px;
  align-items: start;
}

.ayla-chat-page .ayla-chat-card {
  align-self: start;
}

.ayla-chat-welcome {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px 22px 16px;
  background: #FCFBF8;
  border-bottom: 1px solid #E9E6DE;
}

.ayla-chat-welcome img {
  width: 40px;
  height: 40px;
  flex: none;
  margin-top: 0;
}

.ayla-chat-welcome h2 {
  margin: 0;
  max-width: 720px;
  color: #17324D;
  font: 600 21px/1.12 "Cormorant Garamond",Georgia,serif;
  letter-spacing: -.015em;
}

.ayla-chat-welcome p {
  margin: 6px 0 0;
  max-width: 720px;
  color: #66747E;
  font: 400 13px/1.55 Inter,ui-sans-serif,system-ui,sans-serif;
}

.ayla-chat-page .ayla-chat-mount {
  height: 350px;
  min-height: 350px;
  background: #FCFBF8;
}

/* =========================================================
   N8N CHAT INTEGRATION
   Make the embedded chat visually match the Yildirim Lab UI.
   ========================================================= */
.ayla-chat-page #n8n-chat .chat-powered-by,
.ayla-chat-page #n8n-chat .chat-get-started-footer .chat-powered-by {
  display: none !important;
}

.ayla-chat-page #n8n-chat .chat-messages-list {
  padding: 16px 20px 10px !important;
}

.ayla-chat-page #n8n-chat .chat-message {
  font-family: Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif !important;
  font-size: 13.5px !important;
  line-height: 1.58 !important;
}

.ayla-chat-page #n8n-chat .chat-message-from-bot,
.ayla-chat-page #n8n-chat .chat-message.chat-message-from-bot {
  color: #405464 !important;
}

.ayla-chat-page #n8n-chat .chat-input {
  border-top: 1px solid #E7E4DD !important;
  background: #FFF !important;
  padding: 12px 14px !important;
}

.ayla-chat-page #n8n-chat textarea {
  min-height: 44px !important;
  max-height: 110px !important;
  border-radius: 13px !important;
  color: #2E4354 !important;
  font: 400 13.5px/1.45 Inter,ui-sans-serif,system-ui,sans-serif !important;
}

.ayla-chat-page #n8n-chat textarea::placeholder {
  color: #89959D !important;
}

.ayla-chat-page #n8n-chat .chat-input-send-button {
  color: #176D70 !important;
}

@media (max-width:650px) {
  .ayla-chat-welcome {
    padding: 15px 14px 14px;
    gap: 11px;
  }

  .ayla-chat-welcome img {
    width: 34px;
    height: 34px;
  }

  .ayla-chat-welcome h2 {
    font-size: 19px;
  }

  .ayla-chat-welcome p {
    font-size: 12.5px;
  }

}

.ayla-chat-page {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.ayla-chat-page main,
.ayla-chat-page .ayla-chat-shell,
.ayla-chat-page .ayla-chat-card,
.ayla-chat-page .ayla-chat-mount,
.ayla-chat-page #n8n-chat,
.ayla-chat-page #n8n-chat .chat-layout,
.ayla-chat-page #n8n-chat .chat-window-wrapper,
.ayla-chat-page #n8n-chat .chat-window {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.ayla-chat-page #n8n-chat textarea {
  font-size: 16px !important;
}

.ayla-chat-page #n8n-chat .chat-input,
.ayla-chat-page #n8n-chat .chat-inputs,
.ayla-chat-page #n8n-chat .chat-input-body {
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.ayla-chat-page #n8n-chat .chat-input-send-button {
  flex: 0 0 auto !important;
  min-width: 38px !important;
}

@media (max-width:650px) {
  .ayla-chat-page .site-header {
    position: sticky;
    top: 0;
  }

  .ayla-chat-page .ayla-chat-shell {
    width: 100%;
    max-width: 100%;
    padding: 12px max(10px,env(safe-area-inset-right)) calc(22px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));
    overflow: hidden;
  }

  .ayla-chat-page .ayla-intro-card {
    display: none;
  }

  .ayla-chat-page .ayla-chat-card {
    width: 100%;
    max-width: 100%;
    border-radius: 18px;
    overflow: hidden;
  }

  .ayla-chat-page .ayla-chat-topbar {
    display: none;
  }

  .ayla-chat-page .ayla-chat-welcome {
    padding: 13px 12px 12px;
  }

  .ayla-chat-page .ayla-chat-mount {
    height: calc(100dvh - 230px);
    min-height: 430px;
    max-height: 690px;
    width: 100%;
    overflow: hidden;
  }

  .ayla-chat-page #n8n-chat .chat-messages-list {
    padding: 14px 10px 10px !important;
  }

  .ayla-chat-page #n8n-chat .chat-input {
    padding: 10px max(10px,env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left)) !important;
    width: 100% !important;
  }

  .ayla-chat-page #n8n-chat textarea {
    font-size: 16px !important;
    min-width: 0 !important;
    width: 100% !important;
  }
}

@media (min-width:651px) and (max-width:980px) {
  .ayla-chat-page .ayla-chat-card {
    min-height: calc(100dvh - 150px);
  }

  .ayla-chat-page .ayla-chat-mount {
    height: calc(100dvh - 300px);
    min-height: 500px;
  }
}

.ayla-chat-page .ayla-intro-brand .ayla-name .ayla-initial {
  color: #C8A96B !important;
  font-weight: 900 !important;
  font-size: 1.15em !important;
}

/* =========================================================
   AYLA DESKTOP LAYOUT — single source of truth
   Left panel: content-height, scroll only when actually needed.
   Right panel: fills available height; conversation scrolls internally.
   ========================================================= */
@media (min-width: 981px) {
  body.ayla-chat-page {
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body.ayla-chat-page .site-header {
    flex: 0 0 auto;
  }

  body.ayla-chat-page main#main {
    flex: 1 1 auto;
    min-height: 0 !important;
    overflow: hidden;
  }

  body.ayla-chat-page .ayla-chat-shell {
    height: 100%;
    min-height: 0 !important;
    box-sizing: border-box;
    padding-top: 16px;
    padding-bottom: 16px;
    align-items: start !important;
  }

  /* Left information panel */
  body.ayla-chat-page .ayla-intro-card {
    align-self: start !important;
    height: fit-content !important;
    min-height: 0 !important;
    max-height: 100% !important;
    padding-top: 14px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-gutter: auto;
  }

  body.ayla-chat-page .ayla-intro-brand {
    margin-top: 0 !important;
  }

  /* Right chat panel */
  body.ayla-chat-page .ayla-chat-card {
    align-self: stretch !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  body.ayla-chat-page .ayla-chat-mount {
    flex: 1 1 auto;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden;
  }
}

/* AYLA conversation — scrollbar appears only when messages exceed the available height */
.ayla-chat-page #n8n-chat,
.ayla-chat-page #n8n-chat .chat-layout,
.ayla-chat-page #n8n-chat .chat-window-wrapper,
.ayla-chat-page #n8n-chat .chat-window,
.ayla-chat-page #n8n-chat .chat-body {
  height: 100% !important;
  min-height: 0 !important;
}

.ayla-chat-page #n8n-chat .chat-body {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.ayla-chat-page #n8n-chat .chat-messages-list {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
  scrollbar-gutter: auto;
}
