  /* =========================AI Button========================= */
#ai-fab {
    display: inline-block;
    background-color: #087cde;
    font-family: "Poppins", Sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 18px;
    color: #ffffff;
    border-radius: 15px 15px 15px 15px;
    padding: 15px 30px 15px 30px;
    transition: all .3s ease-in-out;
}

#ai-fab:hover {
   background-color: #ffc500;
    color: #242424;
}

/* =========================AI PANEL (CENTER POPUP)========================= */

#ai-panel {
  position: fixed;
  right: 50px;
  top: 180px;
  width: 100%;
  min-width: 400px;
  max-width: 400px;
  background: linear-gradient(180deg, #2c4d78, #263c5d);
  color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 1000;
}

#ai-panel.open {
  opacity: 1;
  pointer-events: auto;
}

/* =========================HEADER========================= */

.ai-header {
    display: grid;
    grid-template-columns: auto 100px 26px;
    justify-content: normal;
    gap: 12px;
    align-items: center;
    padding: 16px 16px;
    background: linear-gradient(180deg, #355c8c, #2f507b);
    border-radius: 16px 16px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: auto;
}

.ai-header p {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.ai-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

#ai-reset {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  padding: 8px 30px;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#ai-reset:hover {
  background: #ffffff;
  color: #2f507b;
}

.close-button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* =========================CHAT CONTAINER (CARD)========================= */

#ai-chat {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 14px;
    margin: 14px;
    min-height: 60px;
    max-height: 318px;
    overflow-y: auto;
}

/* =========================CHAT MESSAGES========================= */

.chat-message {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.25s ease;
}

.chat-label {
  font-size: 11px;
  opacity: 0.7;
  margin-bottom: 4px;
}

/* USER */
.chat-message.user {
  align-items: flex-end;
}

.chat-message.user .chat-bubble {
  background: linear-gradient(135deg, #5fa2ff, #4b86e8);
  color: #ffffff;
  border-radius: 14px 14px 4px 14px;
}

/* AI */
.chat-message.ai {
  align-items: flex-start;
}

.chat-message.ai .chat-bubble {
  background: linear-gradient(180deg, #2b3f5f, #243954);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e9f2ff;
  border-radius: 14px 14px 14px 4px;
}

/* BUBBLE */
.chat-bubble {
  padding: 12px 14px;
  max-width: 85%;
  font-size: 14px;
  line-height: 1.55;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* =========================LINKS & LISTS========================= */

#ai-chat ul {
  padding-left: 16px;
  margin-top: 8px;
}

#ai-chat li {
  margin-bottom: 6px;
}

#ai-chat ul li a {
  color: #fff;
  font-weight: 400;
  text-decoration: none;
}

#ai-chat a:hover {
  text-decoration: underline;
}

/* =========================SUGGESTION BUTTONS========================= */

.chat-suggestions {
  padding: 0 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: end;
}

.ai-suggestion {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.ai-suggestion:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.ai-suggestion.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* =========================INPUT========================= */

#ai-input {
  width: calc(100% - 36px);
  margin: 0 18px 18px;
  padding: 10px;
  border-radius: 10px;
  border: none;
  outline: none;
  font-size: 14px;
}

/* =========================ANIMATION========================= */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================MOBILE========================= */

@media (max-width: 767px) {
    #ai-panel {
        width: calc(100% - 32px);
        right: 16px;
        min-width: auto;
    }
    .ai-header p {
      font-size: 16px;
  }
}
