/* ============================================================
   DERTLI BOT — widget ndihmës për portofolin
   Vetëm shtesë: nuk prek asnjë stil ekzistues të faqes.
   ============================================================ */

.dertli-root,
.dertli-root *,
.dertli-root *::before,
.dertli-root *::after {
  box-sizing: border-box;
}

.dertli-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9001;
  width: 76px;
  height: 76px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: transform 0.25s ease;
}

.dertli-fab:hover {
  transform: scale(1.08);
}

/* Unazë ari rrotulluese — shkëlqim orbital premium rreth logos */
.dertli-fab::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(255, 222, 140, 0.95) 45deg, transparent 95deg, transparent 180deg, rgba(201, 162, 39, 0.45) 225deg, transparent 275deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  animation: dertli-spin 5.5s linear infinite;
  pointer-events: none;
}

@keyframes dertli-spin {
  to { transform: rotate(360deg); }
}

.dertli-fab-icon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: block;
  line-height: 1;
  border: 2.5px solid #c9a227;
  animation: dertli-glow 3.2s ease-in-out infinite;
}

.dertli-fab-icon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #0a0f1e;
}

@keyframes dertli-glow {
  0%, 100% { box-shadow: 0 0 14px rgba(201, 162, 39, 0.55), 0 0 5px rgba(201, 162, 39, 0.8); }
  50% { box-shadow: 0 0 30px rgba(201, 162, 39, 0.95), 0 0 10px rgba(201, 162, 39, 1); }
}

.dertli-fab-label {
  display: none;
}

/* Flluska elegante përshëndetëse — shfaqet një herë, mbyllet me × */
.dertli-hello {
  position: fixed;
  right: 114px;
  bottom: 38px;
  z-index: 9001;
  max-width: 260px;
  padding: 13px 40px 13px 17px;
  background: rgba(15, 20, 35, 0.97);
  border: 1px solid rgba(201, 162, 39, 0.55);
  border-radius: 16px;
  color: #eef1f7;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55), 0 0 20px rgba(201, 162, 39, 0.16);
  opacity: 0;
  transform: translateX(14px);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.dertli-hello.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.dertli-hello::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: 24px;
  width: 12px;
  height: 12px;
  background: rgba(15, 20, 35, 0.97);
  border-right: 1px solid rgba(201, 162, 39, 0.55);
  border-top: 1px solid rgba(201, 162, 39, 0.55);
  transform: rotate(45deg);
}

.dertli-hello strong {
  color: #f0d98a;
}

.dertli-hello-close {
  position: absolute;
  top: 5px;
  right: 7px;
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: #8b93a8;
  font-size: 13px;
  cursor: pointer;
  border-radius: 50%;
}

.dertli-hello-close:hover {
  color: #f0d98a;
}

.dertli-panel {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 9000;
  width: min(380px, calc(100vw - 48px));
  height: min(600px, calc(100dvh - 140px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0d1017;
  border: 1px solid rgba(201, 162, 39, 0.42);
  border-radius: 20px;
  box-shadow: 0 24px 70px -18px rgba(0, 0, 0, 0.8), 0 0 44px rgba(201, 162, 39, 0.12);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.dertli-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.dertli-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #e8c86a, transparent);
  z-index: 2;
  pointer-events: none;
}

.dertli-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(120deg, rgba(201, 162, 39, 0.16), rgba(201, 162, 39, 0.05) 55%, transparent);
  border-bottom: 1px solid rgba(201, 162, 39, 0.28);
}

.dertli-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: #0a0f1e;
  flex-shrink: 0;
  overflow: hidden;
  padding: 0;
  border: 2px solid #c9a227;
  box-shadow: 0 0 12px rgba(201, 162, 39, 0.55);
}

.dertli-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dertli-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.dertli-meta strong {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  color: #e9edf5;
}

.dertli-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 11.5px;
  color: #d9b845;
}

.dertli-online i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d9b845;
  box-shadow: 0 0 0 3px rgba(217, 184, 69, 0.22);
  animation: dertli-pulse 2s ease-in-out infinite;
}

@keyframes dertli-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.dertli-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: transparent;
  color: #97a1b5;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.dertli-close:hover {
  color: #f0d98a;
  border-color: #c9a227;
}

.dertli-panel iframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: #090b10;
  min-height: 0;
}

@media (max-width: 480px) {
  .dertli-fab {
    right: 16px;
    bottom: 16px;
    width: 68px;
    height: 68px;
    padding: 0;
  }
  .dertli-panel {
    right: 12px;
    left: 12px;
    bottom: 88px;
    width: auto;
    height: min(620px, calc(100dvh - 120px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .dertli-fab,
  .dertli-panel {
    transition: none;
  }
  .dertli-fab::before,
  .dertli-fab-icon,
  .dertli-online i {
    animation: none;
  }
  .dertli-hello {
    transition: none;
  }
}

@media (max-width: 480px) {
  .dertli-hello {
    right: 96px;
    bottom: 30px;
    max-width: 220px;
    font-size: 13px;
  }
}
