#edoo-agent-overlay {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(7, 12, 22, .72);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}

#edoo-agent-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

body.edoo-agent-popup-open .crm-chat-panel,
body.edoo-agent-popup-open .crm-chat-button {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.edoo-agent-dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  width: min(1120px, 95vw);
  max-height: 92vh;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .35);
  transform: translateY(18px) scale(.985);
  transition: transform .26s ease;
}

#edoo-agent-overlay.is-open .edoo-agent-dialog {
  transform: translateY(0) scale(1);
}

.edoo-agent-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 610px;
  padding: 52px 58px;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 92%, rgba(213, 23, 35, .08), transparent 32%),
    linear-gradient(135deg, #fff 0%, #f7f8fa 72%, #eceff3 100%);
}

.edoo-agent-copy::before {
  content: "";
  position: absolute;
  right: -70px;
  top: -75px;
  width: 230px;
  height: 230px;
  border: 22px solid rgba(213, 23, 35, .08);
  transform: rotate(35deg);
}

.edoo-agent-logo {
  width: 150px;
  max-height: 52px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 30px;
}

.edoo-agent-eyebrow {
  margin: 0 0 4px;
  color: #111;
  font-size: 64px;
  line-height: .95;
  font-weight: 900;
  letter-spacing: -2px;
}

.edoo-agent-title {
  margin: 10px 0 8px;
  color: #d51723;
  font-size: 48px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -1.5px;
}

.edoo-agent-invite {
  margin: 8px 0 22px;
  color: #111;
  font-size: 25px;
  line-height: 1.25;
  font-weight: 750;
}

.edoo-agent-territory {
  align-self: flex-start;
  margin-bottom: 18px;
  padding: 10px 18px;
  border-radius: 8px;
  background: linear-gradient(90deg, #d51723, #b80f1b);
  color: #fff;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
}

.edoo-agent-territory strong {
  color: #fff;
  font-weight: 900;
}

.edoo-agent-benefits {
  margin: 0 0 24px;
  color: #222;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 700;
}

.edoo-agent-support {
  max-width: 520px;
  margin: 0 0 28px;
  color: #5d6470;
  font-size: 15px;
  line-height: 1.55;
}

.edoo-agent-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-width: 280px;
  padding: 16px 26px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d51723, #b70e1a);
  box-shadow: 0 12px 28px rgba(213, 23, 35, .25);
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

.edoo-agent-cta:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(213, 23, 35, .34);
}

.edoo-agent-visual {
  position: relative;
  min-height: 610px;
  background: #c81420;
}

.edoo-agent-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.edoo-agent-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  background: rgba(16, 19, 26, .62);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background .18s ease;
}

.edoo-agent-close:hover {
  background: rgba(16, 19, 26, .86);
}

@media (max-width: 820px) {
  #edoo-agent-overlay {
    align-items: flex-end;
    padding: 10px;
  }

  .edoo-agent-dialog {
    display: flex;
    flex-direction: column-reverse;
    width: 100%;
    max-height: 94vh;
    overflow-y: auto;
    border-radius: 20px;
  }

  .edoo-agent-copy {
    min-height: auto;
    padding: 28px 24px 30px;
  }

  .edoo-agent-logo {
    width: 116px;
    margin-bottom: 18px;
  }

  .edoo-agent-eyebrow {
    font-size: 40px;
  }

  .edoo-agent-title {
    font-size: 30px;
    letter-spacing: -.8px;
  }

  .edoo-agent-invite {
    margin-bottom: 16px;
    font-size: 19px;
  }

  .edoo-agent-territory {
    width: 100%;
    font-size: 15px;
  }

  .edoo-agent-benefits {
    font-size: 15px;
  }

  .edoo-agent-support {
    font-size: 14px;
  }

  .edoo-agent-cta {
    width: 100%;
    min-width: 0;
    font-size: 17px;
  }

  .edoo-agent-visual {
    flex: 0 0 220px;
    min-height: 220px;
  }

  .edoo-agent-visual img {
    object-position: center 42%;
  }

  .edoo-agent-close {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #edoo-agent-overlay,
  .edoo-agent-dialog,
  .edoo-agent-cta,
  .edoo-agent-close {
    transition: none;
  }
}
