/* Dodo Bilişim — sol alt köşe widget yığını (AI / Şans Çarkı / Paket Asistanı) */
@keyframes dodo-cw-in {
  from { opacity: 0; transform: translateY(30px) scale(.8); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes dodo-cw-shine {
  to { background-position: -200% 0; }
}
@keyframes dodo-cw-pulse {
  0%, 100% { transform: scale(1); opacity: .7; }
  50% { transform: scale(1.25); opacity: .25; }
}
@keyframes dodo-cw-spin {
  to { transform: rotate(360deg); }
}
@keyframes dodo-cw-pop {
  from { opacity: 0; transform: translateY(16px) scale(.95); }
  to { opacity: 1; transform: none; }
}
@keyframes dodo-cw-border {
  to { transform: rotate(360deg); }
}

.dodo-cw-stack {
  position: fixed;
  left: max(16px, env(safe-area-inset-left, 0px));
  /* Above #acw-toolbar-toggle (left/bottom accessibility FAB) */
  bottom: max(76px, calc(20px + 44px + 12px + env(safe-area-inset-bottom, 0px)));
  z-index: 997;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 12px;
  pointer-events: none;
}
.dodo-cw-stack > * { pointer-events: auto; }

.dodo-cw-pill {
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 60px;
  padding: 12px 24px 12px 13px;
  text-decoration: none !important;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 12px 34px rgba(15, 23, 42, .28);
  transition: transform .22s ease, box-shadow .22s ease;
  animation: dodo-cw-in .6s cubic-bezier(.34, 1.56, .64, 1) both;
  user-select: none;
  background: none;
  font: inherit;
  text-align: left;
  color: inherit;
}
.dodo-cw-pill:hover {
  transform: translateY(-3px) scale(1.03);
}
.dodo-cw-pill:focus-visible {
  outline: 2px solid #ff7f27;
  outline-offset: 3px;
}

.dodo-cw-pill__icon {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dodo-cw-pill__icon::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  animation: dodo-cw-pulse 2s ease-in-out infinite;
}
.dodo-cw-pill__icon img {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: contain;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
  transition: transform .3s ease;
}
.dodo-cw-pill:hover .dodo-cw-pill__icon img {
  transform: rotate(12deg) scale(1.08);
}

.dodo-cw-pill__text strong {
  display: block;
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -.2px;
  line-height: 1.15;
}
.dodo-cw-pill__text span {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 500;
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: dodo-cw-shine 2.6s linear infinite;
}

/* AI — teal/green */
.dodo-cw-pill--ai {
  background: linear-gradient(135deg, #091a18 0%, #064e3b 45%, #0f766e 100%);
  border-color: rgba(52, 211, 153, .35);
  box-shadow: 0 12px 34px rgba(6, 78, 59, .45);
  animation-delay: .08s;
}
.dodo-cw-pill--ai:hover { box-shadow: 0 18px 44px rgba(16, 185, 129, .5); }
.dodo-cw-pill--ai .dodo-cw-pill__icon::before {
  background: radial-gradient(circle, rgba(52, 211, 153, .6) 0%, transparent 70%);
}
.dodo-cw-pill--ai .dodo-cw-pill__text span {
  background-image: linear-gradient(90deg, #6ee7b7 30%, #fff 50%, #6ee7b7 70%);
}

/* Wheel — navy/blue */
.dodo-cw-pill--wheel {
  background: linear-gradient(135deg, #0f172a 0%, #1054b0 100%);
  box-shadow: 0 12px 34px rgba(16, 84, 176, .38);
  animation-delay: .04s;
}
.dodo-cw-pill--wheel:hover { box-shadow: 0 18px 44px rgba(16, 84, 176, .5); }
.dodo-cw-pill--wheel .dodo-cw-pill__icon::before {
  background: radial-gradient(circle, rgba(96, 165, 250, .55) 0%, transparent 70%);
}
.dodo-cw-pill--wheel .dodo-cw-pill__text span {
  background-image: linear-gradient(90deg, #ffd166 30%, #fff 50%, #ffd166 70%);
}
.dodo-cw-wheel {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: conic-gradient(
    #2563eb 0 45deg, #f59e0b 45deg 90deg, #10b981 90deg 135deg,
    #ef4444 135deg 180deg, #8b5cf6 180deg 225deg, #eab308 225deg 270deg,
    #06b6d4 270deg 315deg, #ec4899 315deg 360deg
  );
  border: 2.5px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(0, 0, 0, .08);
  animation: dodo-cw-spin 7s linear infinite;
}
.dodo-cw-pill--wheel:hover .dodo-cw-wheel { animation-duration: 1.2s; }
.dodo-cw-wheel::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 11px;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2.5px rgba(15, 23, 42, .25);
}
.dodo-cw-wheel-pin {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 9px solid #fff;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35));
}

/* Package assistant — white + rainbow border */
.dodo-cw-pill--assist {
  position: relative;
  background: transparent;
  border: none;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .18);
  overflow: hidden;
  isolation: isolate;
}
.dodo-cw-pill--assist::before {
  content: '';
  position: absolute;
  z-index: -2;
  left: -50%;
  top: -250%;
  width: 200%;
  height: 600%;
  background: conic-gradient(from 0deg, #ff7f27, #7c3aed, #2563eb, #10b981, #ff7f27);
  animation: dodo-cw-border 4s linear infinite;
}
.dodo-cw-pill--assist::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 2.5px;
  background: #fff;
  border-radius: 58px;
}
.dodo-cw-pill--assist > * { position: relative; z-index: 1; }
.dodo-cw-pill--assist .dodo-cw-assist-ic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ede9fe, #ffedd5);
  color: #7c3aed;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(124, 58, 237, .2);
}
.dodo-cw-pill--assist .dodo-cw-pill__text strong { color: #0f172a; }
.dodo-cw-pill--assist .dodo-cw-pill__text span {
  -webkit-text-fill-color: #64748b;
  background: none;
  animation: none;
  color: #64748b;
}

/* —— AI modal —— */
.dodo-cw-ovl {
  position: fixed;
  inset: 0;
  z-index: 1250;
  background: rgba(15, 23, 42, .6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.dodo-cw-ovl.is-open { display: flex; }

.dodo-cw-ai-pop {
  width: 380px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: dodo-cw-pop .25s cubic-bezier(.34, 1.4, .64, 1);
}
.dodo-cw-ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.dodo-cw-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: #c2410c;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 20px;
  padding: 4px 11px;
}
.dodo-cw-ai-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  font-size: 13px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s, transform .15s;
}
.dodo-cw-ai-close:hover {
  background: #f1f5f9;
  color: #0f172a;
  transform: rotate(90deg);
}
.dodo-cw-ai-branches {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dodo-cw-ai-branch {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  text-decoration: none !important;
  color: inherit !important;
  transition: transform .15s, border-color .15s, box-shadow .15s, background .15s;
}
.dodo-cw-ai-branch:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
}
.dodo-cw-ai-branch--chatgpt:hover { border-color: #10a37f; background: #f0fdf4; }
.dodo-cw-ai-branch--perplexity:hover { border-color: #20b8cd; background: #ecfeff; }
.dodo-cw-ai-branch--copilot:hover { border-color: #0078d4; background: #eff6ff; }
.dodo-cw-ai-branch--grok:hover { border-color: #0f172a; background: #f8fafc; }
.dodo-cw-ai-branch--google:hover { border-color: #4285f4; background: #f8faff; }
.dodo-cw-ai-branch img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
}
.dodo-cw-ai-branch__info { flex: 1; min-width: 0; }
.dodo-cw-ai-branch__title {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}
.dodo-cw-ai-branch__desc {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  margin-top: 2px;
}
.dodo-cw-ai-branch__arrow {
  color: #94a3b8;
  font-size: 12px;
  transition: color .15s, transform .15s;
}
.dodo-cw-ai-branch:hover .dodo-cw-ai-branch__arrow {
  color: #0f172a;
  transform: translate(2px, -1px);
}
.dodo-cw-ai-note {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  margin: 2px 0 0;
  line-height: 1.35;
}

/* —— Package assistant modal —— */
.dodo-cw-pa-box {
  width: 440px;
  max-width: calc(100vw - 32px);
  max-height: min(86vh, 640px);
  overflow: auto;
  background: #fff;
  border-radius: 22px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
  padding: 22px 22px 18px;
  animation: dodo-cw-pop .25s cubic-bezier(.34, 1.4, .64, 1);
}
.dodo-cw-pa-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .9px;
  text-transform: uppercase;
  color: #ff7f27;
  margin: 0 0 4px;
}
.dodo-cw-pa-box h3 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}
.dodo-cw-pa-box > p {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.5;
}
.dodo-cw-pa-step {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 10px;
}
.dodo-cw-pa-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dodo-cw-pa-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
}
.dodo-cw-pa-opt:hover {
  border-color: #ff7f27;
  background: #fff7ed;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 127, 39, .12);
}
.dodo-cw-pa-opt .oi {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff7ed;
  color: #ff7f27;
  flex-shrink: 0;
}
.dodo-cw-pa-opt .ot b {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
}
.dodo-cw-pa-opt .ot small {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}
.dodo-cw-pa-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}
.dodo-cw-pa-nav button {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #334155;
}
.dodo-cw-pa-nav button:hover { background: #f1f5f9; }
.dodo-cw-pa-result {
  background: linear-gradient(135deg, #fff7ed, #fff);
  border: 1px solid #fed7aa;
  border-radius: 16px;
  padding: 16px;
}
.dodo-cw-pa-result h4 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
}
.dodo-cw-pa-result p {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: #475569;
  line-height: 1.55;
}
.dodo-cw-pa-result .dodo-cw-pa-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ff7f27;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 18px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(255, 127, 39, .35);
}
.dodo-cw-pa-result .dodo-cw-pa-cta:hover { filter: brightness(1.05); }
.dodo-cw-pa-alts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.dodo-cw-pa-alts a {
  font-size: 12px;
  font-weight: 600;
  color: #ff7f27 !important;
  text-decoration: none !important;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #fed7aa;
}

/* Desktop: popover near left widgets */
@media (min-width: 821px) {
  .dodo-cw-ovl--ai {
    align-items: flex-end;
    justify-content: flex-start;
    background: rgba(15, 23, 42, .35);
    padding: 0 0 300px 20px;
  }
  .dodo-cw-ovl--ai .dodo-cw-ai-pop {
    margin: 0;
  }
}

/* Launcher — only used on small mobile (collapsed stack) */
.dodo-cw-launcher {
  display: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .22);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: linear-gradient(135deg, #0f172a 0%, #ff7f27 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .35);
  font: inherit;
  flex-shrink: 0;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.dodo-cw-launcher:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 14px 32px rgba(255, 127, 39, .4);
}
.dodo-cw-launcher:focus-visible {
  outline: 2px solid #ff7f27;
  outline-offset: 3px;
}
.dodo-cw-launcher__ic {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
}
.dodo-cw-launcher__ic--close { display: none; }
.dodo-cw-stack.is-open .dodo-cw-launcher__ic--open { display: none; }
.dodo-cw-stack.is-open .dodo-cw-launcher__ic--close { display: flex; }
.dodo-cw-stack.is-open .dodo-cw-launcher {
  background: linear-gradient(135deg, #334155 0%, #0f172a 100%);
}

/* Mobile / tablet: icon-only pills, keep left to avoid clash with right FAB */
@media (max-width: 820px) {
  .dodo-cw-stack {
    left: max(10px, env(safe-area-inset-left, 0px));
    /* Above mobile #acw-toolbar-toggle (14px + 44px + gap) */
    bottom: max(68px, calc(14px + 44px + 10px + env(safe-area-inset-bottom, 0px)));
    gap: 8px;
    max-width: min(56px, calc(100vw - 20px));
  }
  .dodo-cw-pill {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    max-width: 48px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    gap: 0;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .28);
  }
  .dodo-cw-pill:hover { transform: translateY(-2px) scale(1.04); }
  .dodo-cw-pill__text { display: none !important; }
  .dodo-cw-pill__icon,
  .dodo-cw-pill__icon img,
  .dodo-cw-wheel {
    width: 30px;
    height: 30px;
  }
  .dodo-cw-wheel::after {
    width: 9px;
    height: 9px;
  }
  .dodo-cw-wheel-pin {
    top: -5px;
    border-left-width: 5px;
    border-right-width: 5px;
    border-top-width: 7px;
  }
  .dodo-cw-pill--assist::after { border-radius: 50%; inset: 2px; }
  .dodo-cw-pill--assist .dodo-cw-assist-ic {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }
  .dodo-cw-pill__icon::before { inset: -3px; }
  .dodo-cw-ovl--ai {
    align-items: center;
    justify-content: center;
    padding: 16px;
  }
}

/* Small phones: collapse to one launcher so tools don't cover page CTAs */
@media (max-width: 640px) {
  .dodo-cw-stack {
    left: max(8px, env(safe-area-inset-left, 0px));
    /* Above mobile a11y FAB; keep clear of #acw-toolbar-toggle */
    bottom: max(66px, calc(14px + 44px + 8px + env(safe-area-inset-bottom, 0px)));
    gap: 7px;
    max-width: 44px;
  }
  .dodo-cw-launcher {
    display: inline-flex;
    width: 44px;
    height: 44px;
  }
  .dodo-cw-stack:not(.is-open) > .dodo-cw-pill {
    display: none !important;
  }
  .dodo-cw-pill {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    max-width: 44px;
  }
  .dodo-cw-pill__icon,
  .dodo-cw-pill__icon img,
  .dodo-cw-wheel,
  .dodo-cw-pill--assist .dodo-cw-assist-ic {
    width: 28px;
    height: 28px;
  }
  .dodo-cw-pill--assist .dodo-cw-assist-ic { font-size: 12px; }
  .dodo-cw-launcher__ic { font-size: 15px; }
}

@media (max-width: 480px) {
  .dodo-cw-stack {
    /* a11y toggle shrinks to 40px on ≤480 */
    bottom: max(60px, calc(14px + 40px + 8px + env(safe-area-inset-bottom, 0px)));
  }
}

/* When accessibility panel is open, tuck tools so they don't sit under the panel */
body.acw-panel-open .dodo-cw-stack {
  opacity: .35;
  pointer-events: none;
}
body.acw-panel-open .dodo-cw-stack > * {
  pointer-events: none;
}

/* Hide on very constrained / print */
@media print {
  .dodo-cw-stack,
  .dodo-cw-ovl { display: none !important; }
}

/* Avoid overlap with cookie banner when open */
body.cookie-banner-open .dodo-cw-stack {
  bottom: max(180px, calc(120px + 44px + 12px + env(safe-area-inset-bottom, 0px)));
}
