/* =========================================
   NORA FLOATING WIDGET
   nora-widget.css
   ========================================= */

#nora-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

/* ── TOGGLE BUTTON ── */

#nora-toggle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

#nora-toggle:hover { transform: scale(1.08); }

/* Pulse rings */
#nora-toggle::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(245,197,24,0.5);
  animation: nora-ring 2.5s ease-out infinite;
}

#nora-toggle::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1.5px solid rgba(245,197,24,0.25);
  animation: nora-ring 2.5s ease-out infinite 0.6s;
}

@keyframes nora-ring {
  0%   { transform: scale(1);    opacity: 1; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* Globe wrapper */
.nora-globe-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, #1a3a5c, #020b1a);
  box-shadow:
    0 0 0 2px rgba(245,197,24,0.6),
    0 8px 32px rgba(245,197,24,0.3),
    0 4px 16px rgba(26,159,224,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Inner radial glow */
.nora-globe-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, rgba(41,182,246,0.2), transparent 65%);
  animation: nora-glow 3s ease-in-out infinite alternate;
}

@keyframes nora-glow {
  from { opacity: 0.5; }
  to   { opacity: 1; }
}

.nora-globe-svg {
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 1;
}

/* Outer orbit — altın, saat yönü */
.nora-orbit {
  transform-origin: 20px 20px;
  animation: nora-spin 9s linear infinite;
}

/* Inner orbit — mavi, ters */
.nora-orbit-2 {
  transform-origin: 20px 20px;
  animation: nora-spin-rev 14s linear infinite;
}

/* Mid orbit */
.nora-orbit-3 {
  transform-origin: 20px 20px;
  animation: nora-spin 20s linear infinite;
}

@keyframes nora-spin     { to { transform: rotate(360deg);  } }
@keyframes nora-spin-rev { to { transform: rotate(-360deg); } }

/* Node pulse */
.nora-node { animation: nora-npulse 2.2s ease-in-out infinite; }
.nora-node:nth-child(2) { animation-delay: 0.4s; }
.nora-node:nth-child(3) { animation-delay: 0.8s; }
.nora-node:nth-child(4) { animation-delay: 1.2s; }
.nora-node:nth-child(5) { animation-delay: 1.6s; }

@keyframes nora-npulse {
  0%,100% { opacity:1; }
  50%      { opacity:0.45; }
}

/* ── NORA FRAME ── */

#nora-frame {
  width: 400px;
  height: 600px;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35),
              0 0 0 1px rgba(26,159,224,0.2);
  display: none;
  flex-direction: column;
  transform-origin: bottom right;
}

#nora-frame.open {
  display: flex;
  animation: noraOpen 0.3s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

@keyframes noraOpen {
  from { opacity:0; transform:scale(0.85); }
  to   { opacity:1; transform:scale(1); }
}

.nora-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(135deg, #0a1628, #0d1b3e);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.nora-header-left { display:flex; align-items:center; gap:10px; }

.nora-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #29b6f6, #0d52a0);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff; flex-shrink: 0;
}

.nora-header-info strong {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px; font-weight: 700; color: #fff;
}

.nora-header-info span {
  font-size: 11px; color: #4ade80; font-weight: 500;
  display: flex; align-items: center; gap: 4px;
}

.nora-header-info span::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ade80; display: inline-block;
  animation: nora-online 2s ease-in-out infinite;
}

@keyframes nora-online {
  0%,100% { opacity:1; }
  50%      { opacity:0.3; }
}

.nora-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: none;
  color: rgba(255,255,255,0.6); font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.nora-close:hover { background: rgba(255,255,255,0.18); color: #fff; }

#nora-frame iframe { width:100%; flex:1; border:none; }

/* ── MOBILE ── */

@media (max-width: 480px) {
  #nora-widget  { bottom:16px; right:16px; }
  #nora-frame   { width:calc(100vw - 32px); height:72vh; }
  #nora-toggle  { width:54px; height:54px; }
  .nora-globe-wrap { width:54px; height:54px; }
  .nora-globe-svg  { width:34px; height:34px; }
}