* { box-sizing: border-box; }
html { direction: rtl; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Tahoma, sans-serif;
  background: #d9dbd5;
  display: flex;
  justify-content: center;
  direction: rtl;
  text-align: right;
}
.phone {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: #efeae2;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(0,0,0,.15);
  direction: rtl;
}
.phone::before {
  content: "";
  position: absolute;
  inset: 58px 0 0;
  background-image: radial-gradient(rgba(0,0,0,.05) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: .45;
  pointer-events: none;
}
.chat-header {
  height: 58px;
  background: #075e54;
  color: #fff;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: sticky;
  top: 0;
  z-index: 10;
  direction: rtl;
}
.header-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  direction: rtl;
  text-align: right;
}
.header-text { text-align: right; }
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ddd;
  object-fit: cover;
  flex-shrink: 0;
}
h1 { font-size: 16px; margin: 0 0 3px; display: flex; align-items: center; gap: 5px; }
.verify-badge {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #34b7f1;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
p { margin: 0; }
.chat-header p { font-size: 12px; opacity: .9; text-align: right; }
.channel-status {
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.1px;
}
.chat-body {
  position: relative;
  z-index: 1;
  padding: 14px 10px 28px;
  height: calc(100vh - 58px);
  overflow-y: auto;
  scroll-behavior: smooth;
  direction: rtl;
}
.date-pill {
  width: fit-content;
  margin: 0 auto 12px;
  padding: 5px 12px;
  font-size: 12px;
  background: #e1f3fb;
  color: #52636b;
  border-radius: 8px;
}
.bubble {
  position: relative;
  max-width: 88%;
  margin: 8px 0;
  padding: 9px 10px 17px;
  border-radius: 8px;
  box-shadow: 0 1px 1px rgba(0,0,0,.12);
  clear: both;
  direction: rtl;
  text-align: right;
}
.received {
  background: #fff;
  margin-right: 0;
  margin-left: auto;
  border-top-right-radius: 2px;
}
.intro-bubble { font-size: 15px; line-height: 1.6; }
.msg-time {
  font-size: 11px;
  color: #8b8b8b;
  direction: ltr;
  unicode-bidi: plaintext;
  white-space: nowrap;
}
.bubble > .msg-time {
  position: absolute;
  left: 8px;
  bottom: 4px;
}
.voice-bubble {
  width: 305px;
  padding: 8px 8px 6px;
}
.voice-note {
  display: flex;
  align-items: center;
  gap: 9px;
  direction: rtl;
}
.play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #25d366;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}
.wave-wrap { flex: 1; min-width: 0; }
.wave-line {
  position: relative;
  height: 28px;
  overflow: hidden;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 3px;
  direction: ltr;
}
.progress-line { display: none; }
.wave-bar {
  pointer-events: none;
  width: 3px;
  height: 10px;
  border-radius: 6px;
  background: #b8b8b8;
  flex: 1;
  max-width: 4px;
  transition: background .15s ease, transform .15s ease, height .15s ease;
}
.wave-bar.played { background: #25d366; }
.voice-note.playing .wave-bar.active {
  animation: liveWave .65s ease-in-out infinite;
}
@keyframes liveWave {
  0%, 100% { transform: scaleY(.72); }
  50% { transform: scaleY(1.25); }
}
.audio-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -2px;
  font-size: 11px;
  color: #777;
  direction: rtl;
}
.audio-meta .duration,
.audio-meta .msg-time { direction: ltr; unicode-bidi: plaintext; }
.voice-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #ddd;
  flex-shrink: 0;
}

.recording {
  width: fit-content;
  max-width: 88%;
  margin: 8px 0 8px auto;
  background: #fff;
  padding: 9px 12px;
  border-radius: 8px;
  box-shadow: 0 1px 1px rgba(0,0,0,.12);
  direction: rtl;
  text-align: right;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #5f6f6a;
  font-size: 13px;
}
.record-dot {
  width: 9px;
  height: 9px;
  background: #e53935;
  border-radius: 50%;
  display: inline-block;
  animation: recordPulse 1s infinite;
}
@keyframes recordPulse {
  0%, 100% { opacity: .35; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1.08); }
}
.form-bubble { width: 94%; max-width: 94%; padding-bottom: 18px; }
.form-title { font-size: 14px; line-height: 1.45; margin-bottom: 9px; text-align: right; }
form { direction: rtl; text-align: right; }
.field-row { margin-top: 9px; }
form label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  font-size: 13px;
  margin: 0 0 6px;
  color: #23332f;
  text-align: right;
  font-weight: 700;
}
.field-icon {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #e9f8ef;
  color: #128c7e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
form input {
  width: 100%;
  height: 44px;
  border: 1px solid #d7ddd9;
  border-radius: 10px;
  padding: 0 13px;
  font-size: 16px;
  outline: none;
  direction: rtl;
  text-align: right;
  background: #fafafa;
}
form input[type="tel"] { direction: rtl; text-align: right; }
form input:focus {
  border-color: #25d366;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, .12);
}
form button {
  width: 100%;
  margin-top: 12px;
  height: 45px;
  border: none;
  border-radius: 8px;
  background: #25d366;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

.product-box {
  background: linear-gradient(180deg, #f7fff9 0%, #ffffff 100%);
  border: 1px solid rgba(37, 211, 102, .22);
  border-radius: 14px;
  padding: 8px 10px 10px;
  margin-bottom: 10px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.06);
}
.product-image {
  width: 100%;
  max-width: 285px;
  height: auto;
  display: block;
  margin: 0 auto 4px;
  object-fit: contain;
}
.product-info h2 {
  margin: 0 0 5px;
  font-size: 17px;
  color: #12352d;
  font-weight: 800;
}
.product-price {
  width: fit-content;
  margin: 0 auto;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e9f8ef;
  color: #075e54;
  font-size: 15px;
  font-weight: 700;
}
.product-price strong {
  color: #0b7f42;
  font-size: 16px;
}

.hidden { display: none !important; }
@media (min-width: 700px) {
  body { padding: 18px 0; }
  .phone { min-height: calc(100vh - 36px); border-radius: 18px; }
  .chat-body { height: calc(100vh - 94px); }
}

.wave-line:active .wave-bar { opacity: .95; }

.success-bubble {
  font-size: 15px;
  line-height: 1.7;
  padding-bottom: 22px;
}
.success-bubble strong {
  color: #128c7e;
  font-size: 16px;
}
.thanks-body .voice-bubble {
  margin-top: 10px;
}


.thanks-done-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 22px auto 8px;
  animation: donePop .45s ease-out both;
}
.thanks-done-icon {
  width: 128px;
  height: 128px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.16));
}
@keyframes donePop {
  from { opacity: 0; transform: scale(.82); }
  to { opacity: 1; transform: scale(1); }
}
@media (max-width: 420px) {
  .thanks-done-icon { width: 118px; height: 118px; }
}

.field-error {
  display: block;
  margin-top: 6px;
  color: #d93025;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}
.input-error {
  border-color: #d93025 !important;
  box-shadow: 0 0 0 3px rgba(217, 48, 37, .10) !important;
}

.headline-bubble {
  width: 94%;
  max-width: 94%;
  text-align: center;
  font-size: 18px;
  line-height: 1.55;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #075e54 0%, #128c7e 45%, #25d366 100%);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 8px 22px rgba(7, 94, 84, .24);
  padding: 13px 12px 23px;
}
.headline-bubble .msg-time {
  color: rgba(255,255,255,.82);
}

/* Final requested improvements */
.headline-bubble {
  width: 96%;
  max-width: 96%;
  text-align: center;
  font-size: 19px;
  line-height: 1.55;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #ff512f 0%, #f09819 45%, #0bbf65 100%);
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 9px 24px rgba(255, 111, 0, .28), inset 0 1px 0 rgba(255,255,255,.25);
  padding: 14px 12px 24px;
  text-shadow: 0 1px 2px rgba(0,0,0,.22);
}

.form-bubble {
  width: 96%;
  max-width: 96%;
  padding: 12px 12px 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfffd 100%);
  border-radius: 15px;
  border: 1px solid rgba(7, 94, 84, .12);
    margin-bottom: 250px;
}

.product-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #eefcf3 0%, #ffffff 100%);
  border: 1px solid rgba(37, 211, 102, .25);
  border-radius: 13px;
  padding: 7px 8px;
  margin: 0 auto 8px;
  text-align: right;
  box-shadow: 0 3px 12px rgba(0,0,0,.06);
}
.product-image {
  width: 92px;
  max-width: 92px;
  height: auto;
  margin: 0;
  object-fit: contain;
  flex-shrink: 0;
}
.product-info {
  flex: 1;
  min-width: 0;
}
.product-info h2 { display: none; }
.product-price {
  width: auto;
  margin: 0;
  padding: 7px 10px;
  border-radius: 10px;
  background: #fff8e6;
  color: #075e54;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 900;
  border: 1px solid rgba(240, 152, 25, .28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.product-price strong {
  color: #e65100;
  font-size: 15px;
}

.form-title {
  text-align: center;
  font-size: 17px;
  font-weight: 900;
  color: #075e54;
  margin: 5px 0 10px;
}

#orderForm {
  background: #ffffff;
  border: 2px solid #e1e1e1;
  border-radius: 14px;
  padding: 13px 12px 14px;
  box-shadow: 0 3px 8px rgba(0,0,0,.22), inset 0 0 0 1px rgba(255,255,255,.85);
}
.field-row { margin-top: 9px; }
#orderForm .field-row:first-child { margin-top: 0; }
form label {
  justify-content: flex-start;
  font-size: 14px;
  font-weight: 900;
  color: #222;
  margin: 0 2px 5px;
  gap: 2px;
}
.required-star {
  color: #e53935;
  font-size: 16px;
  line-height: 1;
}
.field-icon {
  width: 39px;
  height: 42px;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(180deg, #eeeeee 0%, #d9d9d9 100%);
  color: #202124;
  font-size: 17px;
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  border-left: 1px solid #c7c7c7;
}
.field-row { position: relative; }
form input {
  height: 42px;
  border: 1px solid #cfcfcf;
  border-radius: 8px;
  background: #fff;
  font-size: 15px;
  padding: 0 50px 0 12px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.05);
}
form input:focus {
  border-color: #0aa84f;
  box-shadow: 0 0 0 3px rgba(10,168,79,.14);
}
form button {
  height: 48px;
  margin-top: 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #00a843 0%, #00913a 45%, #006b2f 100%);
  box-shadow: 0 5px 12px rgba(0, 120, 52, .24), inset 0 1px 0 rgba(255,255,255,.28);
  font-size: 19px;
  letter-spacing: -.2px;
}
form button::before {
  content: "🛒";
  margin-left: 8px;
}

@media (max-width: 380px) {
  .headline-bubble { font-size: 17px; }
  .product-image { width: 78px; max-width: 78px; }
  .product-price { font-size: 13px; padding: 6px 8px; }
  #orderForm { padding: 11px 10px 12px; }
  form input { height: 40px; }
  .field-icon { height: 40px; }
  
}
