/* Orderly WhatsApp Chat Widget — iletisim sayfasi */

:root {
  --wa-green: #25D366;
  --wa-green-dark: #128C7E;
  --wa-green-darker: #075E54;
  --wa-bg: #ECE5DD;
  --wa-bg-pattern: #efe7dd;
  --wa-bubble-in: #ffffff;
  --wa-bubble-out: #DCF8C6;
  --wa-text: #111b21;
  --wa-muted: #667781;
}

.wa-shell{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:24px;
  overflow:hidden;
  box-shadow:0 30px 60px -28px rgba(7,94,84,.18), 0 12px 30px -16px rgba(0,0,0,.08);
  display:flex;
  flex-direction:column;
  min-height:640px;
}

.wa-head{
  background:linear-gradient(135deg,var(--wa-green-darker) 0%, var(--wa-green-dark) 100%);
  color:#fff;
  padding:18px 22px;
  display:flex;
  align-items:center;
  gap:14px;
}
.wa-head .ava{
  position:relative;
  flex:none;
  width:52px;height:52px;
  border-radius:50%;
  background:#fff;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 6px 14px -6px rgba(0,0,0,.25);
  overflow:hidden;
}
.wa-head .ava img{ width:42px;height:42px;object-fit:contain }
.wa-head .ava::after{
  content:""; position:absolute; right:2px; bottom:2px;
  width:13px;height:13px;border-radius:50%;
  background:#34d399;border:2.5px solid var(--wa-green-darker);
}
.wa-head .meta{ flex:1;min-width:0 }
.wa-head .meta .name{ font-weight:700;font-size:16px;letter-spacing:.01em;line-height:1.2 }
.wa-head .meta .sub{ display:flex;align-items:center;gap:6px;margin-top:3px;font-size:12.5px;color:rgba(255,255,255,.85) }
.wa-head .meta .sub .dot{ width:7px;height:7px;border-radius:50%;background:#34d399;display:inline-block }
.wa-head .actions{ display:flex;gap:6px }
.wa-head .actions a,
.wa-head .actions button{
  width:36px;height:36px;border-radius:10px;background:rgba(255,255,255,.12);
  display:flex;align-items:center;justify-content:center;color:#fff;border:0;cursor:pointer;
  text-decoration:none;
  transition:background .15s, transform .15s;
}
.wa-head .actions a:hover{ background:rgba(255,255,255,.22); transform:translateY(-1px) }

/* Mesaj alanı */
.wa-body{
  position:relative;
  background:var(--wa-bg);
  flex:1;
  padding:22px 18px 18px;
  overflow-y:auto;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.5) 0, rgba(255,255,255,0) 1px),
    radial-gradient(circle at 75% 65%, rgba(255,255,255,.5) 0, rgba(255,255,255,0) 1px),
    radial-gradient(circle at 50% 80%, rgba(0,0,0,.025) 0, rgba(0,0,0,0) 1.5px);
  background-size:30px 30px, 38px 38px, 22px 22px;
}

.wa-msg{
  display:flex;
  margin-bottom:10px;
  animation: waPop .25s ease both;
}
.wa-msg.in{ justify-content:flex-start }
.wa-msg.out{ justify-content:flex-end }
.wa-bubble{
  max-width:80%;
  padding:8px 12px 20px;
  border-radius:14px;
  font-size:14.5px;
  line-height:1.45;
  color:var(--wa-text);
  position:relative;
  box-shadow:0 1px 1px rgba(0,0,0,.05);
  word-wrap:break-word;
  white-space:normal;
}
.wa-msg.out .wa-bubble{ white-space:pre-wrap }
.wa-msg.in .wa-bubble{
  background:var(--wa-bubble-in);
  border-top-left-radius:4px;
}
.wa-msg.out .wa-bubble{
  background:var(--wa-bubble-out);
  border-top-right-radius:4px;
}
.wa-bubble .time{
  position:absolute;
  bottom:4px;right:10px;
  font-size:10.5px;color:var(--wa-muted);
  display:flex;align-items:center;gap:3px;
}
.wa-msg.out .wa-bubble .time{ color:#4b8c5b }
.wa-bubble strong{ font-weight:700 }
.wa-bubble a{ color:var(--wa-green-dark);text-decoration:underline }

/* Yazma göstergesi */
.wa-typing{
  display:none;
  align-items:center;gap:4px;
  background:#fff;border-radius:14px;border-top-left-radius:4px;
  padding:9px 14px;
  box-shadow:0 1px 1px rgba(0,0,0,.05);
  width:fit-content;
}
.wa-typing.is-on{ display:inline-flex }
.wa-typing span{
  width:7px;height:7px;border-radius:50%;background:#9ca3af;
  animation:waBounce 1s infinite;
}
.wa-typing span:nth-child(2){ animation-delay:.15s }
.wa-typing span:nth-child(3){ animation-delay:.3s }

/* Form alanı (input bar) */
.wa-form{
  background:#f0f2f5;
  padding:12px 14px;
  border-top:1px solid #e5e7eb;
}
.wa-fields{
  display:grid;gap:8px;
  grid-template-columns:1fr 1fr;
  margin-bottom:10px;
}
.wa-field{ position:relative }
.wa-field input{
  width:100%;
  padding:11px 14px;
  border-radius:12px;
  border:1.5px solid #e5e7eb;
  background:#fff;
  font-size:14px;
  color:var(--wa-text);
  transition:border-color .15s, box-shadow .15s;
  font-family:inherit;
}
.wa-field input:focus{
  outline:0;
  border-color:var(--wa-green);
  box-shadow:0 0 0 3px rgba(37,211,102,.15);
}
.wa-field.full{ grid-column:1 / -1 }

.wa-input-row{
  display:flex;align-items:flex-end;gap:8px;
}
.wa-input-row .wa-textarea-wrap{
  flex:1;
  background:#fff;
  border-radius:22px;
  border:1.5px solid transparent;
  padding:8px 14px;
  display:flex;align-items:center;
  transition:border-color .15s, box-shadow .15s;
}
.wa-input-row .wa-textarea-wrap:focus-within{
  border-color:var(--wa-green);
  box-shadow:0 0 0 3px rgba(37,211,102,.15);
}
.wa-input-row textarea{
  width:100%;
  border:0;outline:0;background:transparent;resize:none;
  font-family:inherit;
  font-size:15px;line-height:1.45;
  color:var(--wa-text);
  max-height:160px;
  min-height:24px;
  overflow-y:auto;
}
.wa-send{
  flex:none;
  width:48px;height:48px;border-radius:50%;
  background:var(--wa-green);
  color:#fff;border:0;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 8px 20px -8px rgba(37,211,102,.55);
  transition:background .15s, transform .15s;
}
.wa-send:hover{ background:#1ebe5a; transform:translateY(-1px) }
.wa-send:disabled{ background:#9ca3af; cursor:not-allowed; transform:none; box-shadow:none }
.wa-send svg{ width:22px;height:22px }

.wa-foot-note{
  margin-top:10px;
  font-size:11.5px;color:#6b7280;text-align:center;
  display:flex;align-items:center;justify-content:center;gap:6px;
}
.wa-foot-note svg{ width:13px;height:13px;color:var(--wa-green-dark) }

/* Toast */
.wa-toast{
  position:fixed;left:50%;bottom:30px;transform:translate(-50%, 20px);
  background:#1f2937;color:#fff;padding:12px 20px;border-radius:12px;
  font-size:13.5px;font-weight:600;
  box-shadow:0 14px 38px -16px rgba(0,0,0,.4);
  opacity:0;pointer-events:none;
  transition:transform .25s, opacity .25s;
  z-index:300;
  display:flex;align-items:center;gap:8px;
}
.wa-toast.is-on{ opacity:1; transform:translate(-50%, 0) }

@keyframes waPop{
  from{ opacity:0; transform:translateY(6px) scale(.98) }
  to  { opacity:1; transform:none }
}
@keyframes waBounce{
  0%,80%,100% { transform:scale(.8); opacity:.55 }
  40% { transform:scale(1.15); opacity:1 }
}

/* Mobile */
@media (max-width: 640px) {
  .wa-shell{ min-height:560px;border-radius:18px }
  .wa-head{ padding:14px 16px;gap:12px }
  .wa-head .ava{ width:46px;height:46px }
  .wa-head .ava img{ width:36px;height:36px }
  .wa-fields{ grid-template-columns:1fr }
  .wa-body{ padding:18px 14px 14px }
  .wa-bubble{ font-size:14px;max-width:88% }
  .wa-form{ padding:10px 12px }
  .wa-send{ width:44px;height:44px }
}
