body:has(.afd-page){
  margin:0;
  background:#050505;
  color:#fff;
  font-family:Arial,sans-serif;
}

.afd-page *,
#afdWidgetRoot,
#afdWidgetRoot *{
  box-sizing:border-box;
}

.afd-page{
  min-height:100dvh;
  display:grid;
  place-items:center;
  padding:20px;
  background:
    radial-gradient(circle at 18% 8%,rgba(255,122,24,.18),transparent 32%),
    radial-gradient(circle at 82% 92%,rgba(255,77,0,.14),transparent 34%),
    linear-gradient(180deg,#080808,#030303);
}

#afdChat{
  width:min(760px,100%);
  min-height:min(760px,calc(100dvh - 40px));
  max-height:calc(100dvh - 40px);
  box-sizing:border-box;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  background:rgba(12,12,12,.94);
  backdrop-filter:blur(18px);
  border:1px solid rgba(255,122,24,.34);
  border-radius:28px;
  padding:clamp(22px,4vw,38px);
  box-shadow:
    0 0 0 1px rgba(255,122,24,.08),
    0 24px 90px rgba(255,122,24,.22),
    0 30px 100px rgba(0,0,0,.72);
}

.afd-kicker{
  color:#ff7a18;
  font-weight:900;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-size:12px;
  margin-bottom:10px;
  flex:0 0 auto;
}

.afd-page h1{
  font-size:clamp(38px,7vw,68px);
  line-height:.9;
  margin:0 0 18px;
  letter-spacing:-.07em;
  flex:0 0 auto;
}

#afdMessages{
  flex:1;
  min-height:0;
  overflow-y:auto;
  display:block;
  padding-right:8px;
}

#afdMessages::-webkit-scrollbar{
  width:8px;
}

#afdMessages::-webkit-scrollbar-thumb{
  background:rgba(255,122,24,.45);
  border-radius:999px;
}

#afdMessages::-webkit-scrollbar-track{
  background:rgba(255,255,255,.06);
  border-radius:999px;
}

.afd-chat-msg{
  width:100%;
  max-width:680px;
  color:rgba(255,255,255,.9);
  font-size:clamp(15px,2vw,18px);
  line-height:1.45;
  padding-bottom:16px;
}

.afd-chat-msg strong{
  display:block;
  color:#ff7a18;
  font-size:clamp(22px,3vw,30px);
  line-height:1.15;
  margin:22px 0 8px;
}

.afd-chat-msg strong:first-child{
  margin-top:0;
}

.afd-chat-btns{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:12px;
  margin:22px 0 0;
  padding:0;
  background:none;
}

.afd-chat-btns button,
.afd-lead-form button,
.afd-copy-embed-btn{
  width:100%;
  min-height:54px;
  background:linear-gradient(135deg,#ff9a28,#ff5a00);
  color:#111;
  border:0;
  border-radius:18px;
  padding:14px 18px;
  font-weight:950;
  font-size:15px;
  cursor:pointer;
  box-shadow:
    0 12px 30px rgba(255,122,24,.34),
    inset 0 1px 0 rgba(255,255,255,.28);
  transition:transform .18s ease,filter .18s ease,box-shadow .18s ease;
  white-space:normal;
}

.afd-chat-btns button:hover,
.afd-lead-form button:hover,
.afd-copy-embed-btn:hover{
  transform:translateY(-3px);
  filter:brightness(1.08);
  box-shadow:
    0 18px 44px rgba(255,122,24,.42),
    inset 0 1px 0 rgba(255,255,255,.32);
}

.afd-chat-btns button:active,
.afd-lead-form button:active,
.afd-nav-tools button:active,
.afd-copy-embed-btn:active{
  transform:translateY(0);
}

.afd-lead-form{
  display:grid;
  gap:10px;
  margin-top:22px;
}

.afd-lead-form input,
.afd-lead-form textarea,
.afd-lead-form select{
  width:100%;
  box-sizing:border-box;
  background:rgba(0,0,0,.55);
  color:#fff;
  border:1px solid rgba(255,255,255,.16);
  border-radius:16px;
  padding:14px;
  font-family:inherit;
  font-size:16px;
  outline:none;
}

.afd-lead-form input:focus,
.afd-lead-form textarea:focus,
.afd-lead-form select:focus{
  border-color:rgba(255,122,24,.65);
  box-shadow:0 0 0 3px rgba(255,122,24,.14);
}

.afd-lead-form textarea{
  min-height:120px;
  resize:vertical;
}

.afd-lead-form input::placeholder,
.afd-lead-form textarea::placeholder{
  color:rgba(255,255,255,.48);
}

.afd-trial-card{
  margin-top:8px;
  padding:18px;
  border-radius:22px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,122,24,.24);
}

.afd-trial-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-bottom:14px;
  padding:8px 13px;
  border-radius:999px;
  background:rgba(255,122,24,.14);
  border:1px solid rgba(255,122,24,.34);
  color:#ff9a28;
  font-size:12px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.12em;
}

.afd-trial-card h2,
.afd-trial-card h3{
  margin:0 0 10px;
  color:#fff;
  font-size:clamp(24px,4vw,36px);
  line-height:1;
  letter-spacing:-.04em;
}

.afd-trial-card p{
  margin:0 0 14px;
  color:rgba(255,255,255,.76);
  line-height:1.45;
}

.afd-embed-box{
  margin-top:14px;
  padding:14px;
  border-radius:16px;
  background:#050505;
  border:1px solid rgba(255,255,255,.14);
  color:#ffb26b;
  font-family:monospace;
  font-size:13px;
  line-height:1.45;
  overflow:auto;
  white-space:pre-wrap;
  word-break:break-word;
  overflow-wrap:anywhere;
}

.afd-small-note{
  margin-top:10px;
  color:rgba(255,255,255,.56);
  font-size:13px;
  line-height:1.4;
}

.afd-nav-tools{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:22px;
  padding-top:14px;
  background:transparent;
  border-top:1px solid rgba(255,255,255,.1);
}

.afd-nav-tools button{
  background:rgba(255,255,255,.04);
  color:rgba(255,255,255,.68);
  border:1px solid rgba(255,255,255,.14);
  border-radius:999px;
  padding:9px 14px;
  font-weight:800;
  cursor:pointer;
  transition:.2s ease;
}

.afd-nav-tools button:hover{
  color:#fff;
  border-color:#ff7a18;
  background:rgba(255,122,24,.1);
}

@media(max-width:700px){
  .afd-page{
    min-height:100dvh;
    height:auto;
    display:block;
    padding:10px;
    overflow:visible;
  }

  #afdChat{
    width:100%;
    height:auto;
    min-height:calc(100dvh - 20px);
    max-height:none;
    overflow:visible;
    border-radius:22px;
    padding:20px 18px;
  }

 .afd-page h1{
  font-size:42px;
  line-height:.95;
  margin-bottom:16px;
}

  #afdMessages{
    height:auto;
    max-height:none;
    overflow:visible;
    padding-right:0;
  }

  .afd-chat-msg,
  .afd-trial-card{
    height:auto;
    max-height:none;
    overflow:visible;
  }

  .afd-chat-msg{
    font-size:16px;
    padding-bottom:24px;
  }

  .afd-chat-msg strong{
    font-size:22px;
    margin-top:18px;
  }

  .afd-chat-btns{
    grid-template-columns:1fr;
    gap:10px;
    margin-top:18px;
  }

  .afd-chat-btns button,
  .afd-lead-form button,
  .afd-copy-embed-btn{
    min-height:54px;
    border-radius:16px;
    font-size:15px;
    position:relative;
    z-index:2;
  }

  .afd-trial-card{
    padding:16px;
    border-radius:20px;
  }

  .afd-nav-tools{
    flex-direction:column;
  }

  .afd-nav-tools button{
    width:100%;
  }
}
/* =========================
   EMBEDDED WEBSITE WIDGET
   ========================= */

#afdWidgetRoot{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:2147483000;
  width:auto;
  height:auto;
  font-family:Arial,sans-serif;
}

#afdWidgetLauncher{
  min-width:160px;
  min-height:56px;
  border:0;
  border-radius:999px;
  padding:14px 22px;
  background:linear-gradient(135deg,#ff9a28,#ff5a00);
  color:#111;
  font-size:15px;
  font-weight:950;
  cursor:pointer;
  box-shadow:
    0 16px 42px rgba(255,122,24,.38),
    0 18px 60px rgba(0,0,0,.34),
    inset 0 1px 0 rgba(255,255,255,.3);
  transition:
    transform .18s ease,
    filter .18s ease,
    box-shadow .18s ease;
}

#afdWidgetLauncher:hover{
  transform:translateY(-3px);
  filter:brightness(1.06);
  box-shadow:
    0 22px 52px rgba(255,122,24,.44),
    0 22px 70px rgba(0,0,0,.42),
    inset 0 1px 0 rgba(255,255,255,.34);
}

#afdWidgetLauncher:active{
  transform:translateY(0);
}

#afdWidgetPanel{
  position:absolute;
  right:0;
  bottom:72px;
  width:min(420px,calc(100vw - 32px));
  height:min(650px,calc(100dvh - 120px));
  display:flex;
  flex-direction:column;
  overflow:hidden;
  visibility:hidden;
  opacity:0;
  pointer-events:none;
  transform:translateY(18px) scale(.98);
  transform-origin:bottom right;
  background:rgba(12,12,12,.98);
  color:#fff;
  border:1px solid rgba(255,122,24,.34);
  border-radius:24px;
  box-shadow:
    0 0 0 1px rgba(255,122,24,.08),
    0 24px 80px rgba(0,0,0,.66),
    0 18px 60px rgba(255,122,24,.18);
  backdrop-filter:blur(18px);
  transition:
    opacity .2s ease,
    transform .2s ease,
    visibility .2s ease;
}

#afdWidgetPanel.afd-widget-open{
  visibility:visible;
  opacity:1;
  pointer-events:auto;
  transform:translateY(0) scale(1);
}

.afd-widget-header{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 18px 16px;
  border-bottom:1px solid rgba(255,255,255,.1);
  background:
    linear-gradient(180deg,rgba(255,122,24,.1),transparent),
    rgba(10,10,10,.96);
}

.afd-widget-header > div{
  min-width:0;
}

.afd-widget-header .afd-kicker{
  margin:0 0 4px;
  font-size:10px;
}

#afdWidgetBusinessName{
  display:block;
  overflow:hidden;
  color:#fff;
  font-size:17px;
  line-height:1.2;
  text-overflow:ellipsis;
  white-space:nowrap;
}

#afdWidgetClose{
  flex:0 0 auto;
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.14);
  border-radius:50%;
  background:rgba(255,255,255,.05);
  color:#fff;
  font-size:26px;
  line-height:1;
  cursor:pointer;
  transition:.18s ease;
}

#afdWidgetClose:hover{
  border-color:#ff7a18;
  background:rgba(255,122,24,.12);
}

#afdWidgetPanel #afdMessages{
  flex:1;
  min-height:0;
  overflow-y:auto;
  padding:18px;
}

#afdWidgetPanel .afd-chat-msg{
  max-width:none;
  padding-bottom:8px;
  font-size:15px;
}

#afdWidgetPanel .afd-chat-msg strong{
  font-size:22px;
  line-height:1.15;
}

#afdWidgetPanel .afd-chat-btns{
  grid-template-columns:1fr;
  gap:10px;
  margin-top:18px;
}

#afdWidgetPanel .afd-chat-btns button,
#afdWidgetPanel .afd-lead-form button{
  min-height:50px;
  border-radius:15px;
  font-size:14px;
}

#afdWidgetPanel .afd-trial-card{
  padding:15px;
  border-radius:18px;
}

#afdWidgetPanel .afd-trial-card h2,
#afdWidgetPanel .afd-trial-card h3{
  font-size:22px;
}

#afdWidgetPanel .afd-lead-form{
  margin-top:16px;
}

#afdWidgetPanel .afd-lead-form input,
#afdWidgetPanel .afd-lead-form textarea,
#afdWidgetPanel .afd-lead-form select{
  font-size:16px;
  border-radius:14px;
  padding:13px;
}

#afdWidgetPanel .afd-lead-form textarea{
  min-height:96px;
}

#afdWidgetPanel .afd-nav-tools{
  margin-top:18px;
}

#afdWidgetPanel .afd-value-list{
  display:grid;
  gap:8px;
  margin-top:12px;
}

@media(max-width:700px){
  #afdWidgetRoot{
    right:12px;
    bottom:12px;
    left:12px;
  }

  #afdWidgetLauncher{
    float:right;
    min-width:150px;
    min-height:52px;
    padding:13px 18px;
  }

  #afdWidgetPanel{
    position:fixed;
    left:10px;
    right:10px;
    bottom:76px;
    width:auto;
    height:min(680px,calc(100dvh - 96px));
    max-height:none;
    border-radius:22px;
    transform-origin:bottom center;
  }

  #afdWidgetPanel #afdMessages{
    height:auto;
    max-height:none;
    overflow-y:auto;
    padding:16px;
  }

  #afdWidgetPanel .afd-chat-msg,
  #afdWidgetPanel .afd-trial-card{
    height:auto;
    max-height:none;
    overflow:visible;
  }

  #afdWidgetPanel .afd-chat-msg{
    font-size:15px;
    padding-bottom:18px;
  }

  #afdWidgetPanel .afd-chat-msg strong{
    font-size:21px;
  }

  #afdWidgetPanel .afd-nav-tools{
    flex-direction:column;
  }

  #afdWidgetPanel .afd-nav-tools button{
    width:100%;
  }
}
/* Premium text card without changing existing scrolling */
#afdWidgetPanel .afd-chat-copy{
  padding:18px;
  border:1px solid rgba(255,122,24,.28);
  border-radius:20px;
  background:
    linear-gradient(
      145deg,
      rgba(255,122,24,.07),
      rgba(255,255,255,.025) 52%,
      rgba(0,0,0,.16)
    );
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 12px 30px rgba(0,0,0,.24);
  color:rgba(255,255,255,.94);
  line-height:1.55;
  overflow-wrap:anywhere;
}

#afdWidgetPanel .afd-chat-copy strong{
  margin-top:18px;
}

#afdWidgetPanel .afd-chat-copy strong:first-child{
  margin-top:0;
}

#afdWidgetPanel .afd-chat-copy + .afd-chat-btns,
#afdWidgetPanel .afd-chat-copy + .afd-lead-form{
  margin-top:16px;
}

@media(max-width:700px){
  #afdWidgetPanel .afd-chat-copy{
    padding:16px;
    border-radius:18px;
    line-height:1.5;
  }
}

