/* assets/css/ntf-ai.css */
:root {
  --ntf-ai-bg: #0b1220;
  --ntf-ai-panel: rgba(13, 28, 55, 0.96);
  --ntf-ai-panel-2: rgba(255, 255, 255, 0.06);
  --ntf-ai-border: rgba(255, 255, 255, 0.14);
  --ntf-ai-text: #f5f7fa;
  --ntf-ai-muted: rgba(255, 255, 255, 0.72);
  --ntf-ai-accent: #f1c40f;
  --ntf-ai-accent-2: #ffd166;
  --ntf-ai-blue: #7dd3fc;
  --ntf-ai-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
}

.ntf-ai {
  position: fixed;
  z-index: 9999;
  left: 20px;
  bottom: 20px;
  font-family: Tahoma, Arial, sans-serif;
  color: var(--ntf-ai-text);
}
.ntf-ai * {
  box-sizing: border-box;
}
.ntf-ai__toggle {
  width: 68px;
  height: 68px;
  border-radius: 24px;
  border: 1px solid rgba(241, 196, 15, 0.55);
  background: linear-gradient(
    145deg,
    rgba(241, 196, 15, 0.95),
    rgba(255, 209, 102, 0.75)
  );
  color: #0b1220;
  font-weight: 900;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  cursor: pointer;
  display: grid;
  place-items: center;
  gap: 0;
  font-size: 18px;
  transition: 0.22s;
}
.ntf-ai__toggle:hover {
  transform: translateY(-3px) scale(1.02);
}
.ntf-ai__spark {
  font-size: 25px;
  line-height: 1;
}
.ntf-ai__panel {
  position: absolute;
  left: 0;
  bottom: 82px;
  width: min(390px, calc(100vw - 28px));
  height: min(620px, calc(100vh - 115px));
  border: 1px solid var(--ntf-ai-border);
  border-radius: 24px;
  background:
    radial-gradient(
      420px 160px at 100% 0%,
      rgba(241, 196, 15, 0.13),
      transparent
    ),
    var(--ntf-ai-panel);
  box-shadow: var(--ntf-ai-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
}
.ntf-ai__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--ntf-ai-border);
  background: rgba(0, 0, 0, 0.16);
}
.ntf-ai__head strong {
  display: block;
  color: var(--ntf-ai-accent);
  font-size: 17px;
}
.ntf-ai__head span {
  display: block;
  color: var(--ntf-ai-muted);
  font-size: 12px;
  margin-top: 1px;
}
.ntf-ai__close {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--ntf-ai-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ntf-ai-text);
  font-size: 22px;
  cursor: pointer;
}
.ntf-ai__mode {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-inline-start: auto;
  color: var(--ntf-ai-muted);
  font-size: 11px;
  cursor: pointer;
  user-select: none;
}
.ntf-ai__mode input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ntf-ai__mode-ui {
  width: 38px;
  height: 21px;
  border-radius: 999px;
  border: 1px solid var(--ntf-ai-border);
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  transition: 0.2s;
}
.ntf-ai__mode-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  transition: 0.2s;
}
.ntf-ai__mode input:checked + .ntf-ai__mode-ui {
  background: rgba(241, 196, 15, 0.22);
  border-color: rgba(241, 196, 15, 0.65);
}
.ntf-ai__mode input:checked + .ntf-ai__mode-ui::after {
  right: 19px;
  background: var(--ntf-ai-accent);
}
.ntf-ai__mode em {
  font-style: normal;
  white-space: nowrap;
}

.ntf-ai__body {
  padding: 14px;
  overflow: auto;
  flex: 1;
  scrollbar-color: rgba(241, 196, 15, 0.65) rgba(255, 255, 255, 0.05);
}
.ntf-ai__intro {
  border: 1px solid var(--ntf-ai-border);
  border-radius: 18px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.16);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.ntf-ai__logo {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(241, 196, 15, 0.12);
  display: grid;
  place-items: center;
}
.ntf-ai__intro p {
  margin: 0;
  color: var(--ntf-ai-muted);
  font-size: 13px;
  line-height: 1.8;
}
.ntf-ai__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.ntf-ai__suggestions button {
  border: 1px solid rgba(241, 196, 15, 0.35);
  background: rgba(241, 196, 15, 0.08);
  color: var(--ntf-ai-accent);
  border-radius: 999px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.ntf-ai__messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ntf-ai__msg {
  border: 1px solid var(--ntf-ai-border);
  border-radius: 18px;
  padding: 10px 12px;
  line-height: 1.85;
  font-size: 13.5px;
  word-break: break-word;
}
.ntf-ai__msg p {
  margin: 0 0 8px;
  color: var(--ntf-ai-muted);
}
.ntf-ai__msg p:last-child {
  margin-bottom: 0;
}
.ntf-ai__msg--user {
  align-self: flex-end;
  max-width: 88%;
  background: rgba(241, 196, 15, 0.12);
  border-color: rgba(241, 196, 15, 0.35);
}
.ntf-ai__msg--assistant {
  align-self: flex-start;
  max-width: 94%;
  background: rgba(255, 255, 255, 0.055);
}
.ntf-ai__msg.is-loading {
  opacity: 0.78;
  animation: ntfAiPulse 1.2s ease-in-out infinite alternate;
}
@keyframes ntfAiPulse {
  to {
    opacity: 0.45;
  }
}
.ntf-ai__form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--ntf-ai-border);
  background: rgba(0, 0, 0, 0.2);
}
.ntf-ai__input {
  flex: 1;
  resize: none;
  border: 1px solid var(--ntf-ai-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ntf-ai-text);
  padding: 10px 12px;
  font-family: inherit;
  line-height: 1.7;
  outline: none;
  min-height: 46px;
  max-height: 120px;
}
.ntf-ai__input:focus {
  border-color: rgba(241, 196, 15, 0.62);
  box-shadow: 0 0 0 3px rgba(241, 196, 15, 0.1);
}
.ntf-ai__send {
  border: 0;
  border-radius: 15px;
  background: var(--ntf-ai-accent);
  color: #0b1220;
  font-weight: 900;
  padding: 0 15px;
  cursor: pointer;
}

.ntf-ai-page__hero {
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
  padding: 26px;
  margin-bottom: 20px;
}
.ntf-ai-page__hero h1 {
  color: var(--accent, #f1c40f);
  margin: 10px 0;
  font-size: 32px;
}
.ntf-ai-page__hero p {
  color: rgba(255, 255, 255, 0.74);
  max-width: 80ch;
  line-height: 1.95;
}
.ntf-ai-page__start {
  border: 0;
  border-radius: 999px;
  background: var(--accent, #f1c40f);
  color: #0b1220;
  font-weight: 900;
  padding: 12px 18px;
  cursor: pointer;
  margin-top: 10px;
}
.ntf-ai-page__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.ntf-ai-page__card {
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.16);
  padding: 18px;
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: 0.22s;
}
.ntf-ai-page__card:hover {
  transform: translateY(-3px);
  border-color: rgba(241, 196, 15, 0.55);
  background: rgba(241, 196, 15, 0.06);
}
.ntf-ai-page__card span {
  font-size: 26px;
}
.ntf-ai-page__card strong {
  color: var(--accent, #f1c40f);
}
.ntf-ai-page__card em {
  color: rgba(255, 255, 255, 0.68);
  font-style: normal;
  font-size: 13px;
}

@media (max-width: 720px) {
  .ntf-ai {
    left: 12px;
    bottom: 12px;
  }
  .ntf-ai__panel {
    bottom: 76px;
  }
  .ntf-ai-page__grid {
    grid-template-columns: 1fr;
  }
  .ntf-ai__toggle {
    width: 62px;
    height: 62px;
    border-radius: 21px;
  }
}
.ntf-ai__panel[hidden] {
  display: none !important;
}

.ntf-ai__link {
  color: var(--ntf-ai-accent);
  font-weight: 900;
  text-decoration: none;
  border-bottom: 1px dashed rgba(241, 196, 15, 0.7);
}

.ntf-ai__link:hover {
  color: var(--ntf-ai-accent-2);
  border-bottom-style: solid;
}

.ntf-ai__toggle-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 8px;
}

@keyframes ntfAiAttention {
  0%,
  90%,
  100% {
    transform: translateY(0);
  }

  92% {
    transform: translateY(-4px);
  }

  94% {
    transform: translateY(2px);
  }

  96% {
    transform: translateY(-2px);
  }

  98% {
    transform: translateY(0);
  }
}

.ntf-ai__toggle {
  animation: ntfAiAttention 12s infinite;
  padding: 0;
  overflow: hidden;
}

.ntf-ai__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ntf-ai__logo {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

.ntf-ai__title {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.ntf-ai__title strong {
  font-size: 15px;
  color: #fff;
}

.ntf-ai__title span {
  font-size: 12px;
  color: #aab4c5;
}

.ntf-ai__title strong {
  color: #f1c40f;
}
