.cs-agent-section {
  width: 100%;
  padding: 0;
  background: transparent;
  color: #203878;
}

.cs-agent-wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

/* Desktop layout: help cards left, agent right */

@media (min-width: 901px) {
  .cs-agent-wrap:has(.cs-agent-help-grid) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    grid-template-areas: "agent help";
    gap: 24px;
    align-items: stretch;
  }

  .cs-agent-wrap:has(.cs-agent-help-grid) .cs-agent-card {
    grid-area: agent;
  }

  .cs-agent-wrap:has(.cs-agent-help-grid) .cs-agent-help-grid {
    grid-area: help;
  }
}}
}

/* Main embedded agent card */

.cs-agent-card {
  position: relative;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  overflow: hidden;
  min-height: 620px;
  background: #ffffff;
  border: 1px solid rgba(32, 56, 120, 0.18);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(32, 56, 120, 0.16);
}

.cs-agent-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #ffffff;
}

.cs-agent-card--no-sidebar {
  grid-template-columns: 1fr;
}

.cs-agent-sidebar {
  padding: 28px;
  background: #ffffff;
  border-right: 1px solid rgba(32, 56, 120, 0.12);
}

.cs-agent-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(32, 56, 120, 0.1);
}

.cs-agent-icon,
.cs-agent-placeholder-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  background: #203878;
  color: #ffffff;
  font-size: 18px;
}

.cs-agent-brand-title {
  margin: 0;
  color: #203878;
  font-size: 17px;
  font-weight: 800;
}

.cs-agent-brand-subtitle {
  margin: 3px 0 0;
  color: #5f6f96;
  font-size: 13px;
  line-height: 1.4;
}

.cs-agent-sidebar-list {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.cs-agent-sidebar-label {
  margin: 0 0 4px;
  color: #5f6f96;
  font-size: 13px;
  font-weight: 700;
}

.cs-agent-sidebar-list span {
  display: block;
  color: #203878;
  font-size: 15px;
}

/* Header inside the rounded module */

.cs-agent-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cs-agent-main-header {
  display: flex;
  align-items: center;
  min-height: 92px;
  padding: 24px 32px;
  background: #ffffff;
  border-bottom: 3px solid rgba(32, 56, 120, 0.12);
}

.cs-agent-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cs-agent-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  background: #203878;
}

.cs-agent-title-icon svg {
  width: 28px;
  height: 28px;
  fill: #ffffff;
}

.cs-agent-main-title {
  margin: 0;
  color: #203878;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
}

.cs-agent-main-subtitle {
  margin-top: 4px;
  color: #5f6f96;
  font-size: 14px;
  line-height: 1.45;
}

.cs-agent-main-subtitle p {
  margin: 0;
}

/* Embed area */

.cs-agent-embed {
  position: relative;
  flex: 1;
  width: 100%;
  background:
    radial-gradient(circle at top right, rgba(33, 208, 156, 0.08), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.cs-agent-placeholder,
.cs-agent-loading {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100%, 620px);
  min-height: inherit;
  margin: 0 auto;
  padding: 36px;
  text-align: left;
}

.cs-agent-placeholder h3 {
  margin: 22px 0 10px;
  color: #203878;
  font-size: 28px;
  line-height: 1.2;
}

.cs-agent-placeholder p,
.cs-agent-placeholder-text {
  color: #384c7a;
  font-size: 16px;
  line-height: 1.6;
}

.cs-agent-placeholder-text p {
  margin: 0;
}

.cs-agent-fake-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin-top: 30px;
  padding: 16px 16px 16px 20px;
  background: #ffffff;
  border: 1px solid rgba(32, 56, 120, 0.18);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(32, 56, 120, 0.08);
  color: #7b88a8;
  font-size: 15px;
}

.cs-agent-fake-input button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: #e5007e;
  color: #ffffff;
  font-size: 20px;
  cursor: default;
}

.cs-agent-loading {
  align-items: center;
  text-align: center;
  color: #384c7a;
}

/* Help cards */

.cs-agent-help-grid {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

@media (min-width: 901px) {
  .cs-agent-wrap:has(.cs-agent-help-grid) .cs-agent-help-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
    margin-top: 0;
    align-self: stretch;
    align-content: start;
  }

  .cs-agent-wrap:has(.cs-agent-help-grid) .cs-agent-help-grid--1,
  .cs-agent-wrap:has(.cs-agent-help-grid) .cs-agent-help-grid--2,
  .cs-agent-wrap:has(.cs-agent-help-grid) .cs-agent-help-grid--3,
  .cs-agent-wrap:has(.cs-agent-help-grid) .cs-agent-help-grid--4 {
    grid-template-columns: 1fr !important;
  }
}

.cs-agent-help-grid--1 {
  grid-template-columns: minmax(0, 1fr);
}

.cs-agent-help-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cs-agent-help-grid--3,
.cs-agent-help-grid--4 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cs-agent-help-grid--4 .cs-agent-help-card {
  min-height: 100%;
}

.cs-agent-help-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
  background: #ffffff;
  border: 1px solid rgba(32, 56, 120, 0.12);
  border-radius: 16px;
  color: #203878;
  text-decoration: none !important;
  box-shadow: 0 8px 22px rgba(32, 56, 120, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cs-agent-help-card *,
.cs-agent-help-card:hover *,
.cs-agent-help-card:focus * {
  text-decoration: none !important;
}

.cs-agent-help-card:hover,
.cs-agent-help-card:focus {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(32, 56, 120, 0.1);
}

.cs-agent-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  min-width: 30px;
  color: #136D5B;
  font-size: 24px;
  line-height: 1;
  transition: color 0.2s ease;
}

.cs-agent-help-icon svg {
  display: block;
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.cs-agent-help-card strong {
  display: block;
  margin-bottom: 6px;
  color: #203878;
  font-size: 16px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.cs-agent-help-card small {
  display: block;
  color: #5f6f96;
  font-size: 14px;
  line-height: 1.5;
}

/* HubSpot inline embed styling */

.cs-agent-embed {
  --cs-agent-banner-crop: 70px;
  overflow: hidden;
}

.cs-agent-embed #hubspot-conversations-inline-parent {
  width: 100%;
  height: calc(100% + var(--cs-agent-banner-crop));
  min-height: calc(620px + var(--cs-agent-banner-crop));
  overflow: hidden;
  transform: translateY(calc(-1 * var(--cs-agent-banner-crop)));
}

.cs-agent-embed #hubspot-conversations-inline-iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: calc(620px + var(--cs-agent-banner-crop)) !important;
  border: 0 !important;
}

.cs-agent-embed.cs-agent-loaded [data-agent-loading] {
  display: none;
}

/* Mobile */

@media (max-width: 900px) {
  .cs-agent-wrap {
    display: block;
  }

  .cs-agent-card {
    grid-template-columns: 1fr;
  }

  .cs-agent-sidebar {
    display: none;
  }

  .cs-agent-main-header {
    padding: 20px;
  }

  .cs-agent-title-icon {
    display: none;
  }

  .cs-agent-main-title {
    font-size: 21px;
  }

  .cs-agent-main-subtitle {
    font-size: 14px;
  }

  .cs-agent-placeholder,
  .cs-agent-loading {
    padding: 28px 20px;
  }

  .cs-agent-help-grid,
  .cs-agent-help-grid--1,
  .cs-agent-help-grid--2,
  .cs-agent-help-grid--3,
  .cs-agent-help-grid--4 {
    grid-template-columns: 1fr;
    margin-top: 24px;
  }
}

/* Final visible shell around the embedded agent */

.cs-agent-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #ffffff;
  border: 0 !important;
  border-radius: 22px !important;
  box-shadow: 0 18px 45px rgba(32, 56, 120, 0.14) !important;
}

/* Draw one thin visible rounded outline above the iframe/content */
.cs-agent-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  border-radius: 22px;
  box-shadow: inset 0 0 0 1px rgba(32, 56, 120, 0.12);
}

/* Keep the actual module content below the outline */
.cs-agent-main,
.cs-agent-sidebar {
  position: relative;
  z-index: 1;
}

/* Keep the title icon navy */
.cs-agent-title-icon {
  background: #203878;
}