/* ===================================================================
   ANED AI ASSISTANT — Chat Widget
   Navy: #1B3A6B | Gold: #C8960C
=================================================================== */

/* Toggle button */
.aned-chat-toggle {
  position: fixed;
  bottom: 30px;
  right: 100px;
  z-index: 10000;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #C8960C;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  transition: all 0.3s ease;
}
.aned-chat-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(0,0,0,0.35);
}
.aned-chat-toggle .aned-icon-open,
.aned-chat-toggle .aned-icon-close {
  position: absolute;
  transition: all 0.3s ease;
}
.aned-chat-toggle .aned-icon-open {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 30%;
}
.aned-chat-toggle .aned-icon-close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}
.aned-chat-toggle.aned-open .aned-icon-open {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}
.aned-chat-toggle.aned-open .aned-icon-close {
  opacity: 1;
  transform: rotate(0) scale(1);
}

/* Greeting bubble */
.aned-greeting {
  position: fixed;
  bottom: 100px;
  right: 100px;
  z-index: 10000;
  background: #fff;
  color: #1B3A6B;
  padding: 14px 20px;
  border-radius: 16px;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 24px rgba(27,58,107,0.15);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  max-width: 280px;
  animation: anedSlideUp 0.4s ease;
  cursor: pointer;
}
.aned-greeting::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: 2px 2px 4px rgba(0,0,0,0.05);
}
.aned-greeting strong {
  color: #C8960C;
}
.aned-greeting-close {
  position: absolute;
  top: 6px;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: rgba(27,58,107,0.3);
  line-height: 1;
  padding: 2px;
}
.aned-greeting-close:hover {
  color: #1B3A6B;
}

/* Chat window */
.aned-chat-window {
  position: fixed;
  bottom: 100px;
  right: 100px;
  z-index: 10001;
  width: 380px;
  max-width: calc(100vw - 40px);
  height: 520px;
  max-height: calc(100vh - 140px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(27, 58, 107, 0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Outfit', sans-serif;
}
.aned-chat-window.aned-visible {
  display: flex;
  animation: anedSlideUp 0.3s ease;
}
@keyframes anedSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header */
.aned-chat-header {
  background: #1B3A6B;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.aned-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #C8960C;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.aned-chat-avatar svg {
  width: 22px;
  height: 22px;
}
.aned-chat-header-text {
  flex: 1;
}
.aned-chat-header-title {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
}
.aned-chat-header-sub {
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  margin: 2px 0 0;
  letter-spacing: 0.5px;
}
.aned-chat-header-sub .aned-online-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4CAF50;
  margin-right: 4px;
  vertical-align: middle;
}
.aned-chat-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
}
.aned-chat-close svg {
  width: 18px;
  height: 18px;
  fill: rgba(255,255,255,0.5);
  transition: fill 0.2s;
}
.aned-chat-close:hover svg {
  fill: #fff;
}

/* Messages area */
.aned-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8f9fb;
}
.aned-chat-messages::-webkit-scrollbar {
  width: 4px;
}
.aned-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(27,58,107,0.15);
  border-radius: 4px;
}

/* Message bubbles */
.aned-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
}
.aned-msg-bot {
  align-self: flex-start;
  background: #fff;
  color: #1B3A6B;
  border: 1px solid rgba(27,58,107,0.08);
  border-bottom-left-radius: 4px;
}
.aned-msg-user {
  align-self: flex-end;
  background: #1B3A6B;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.aned-msg-bot a {
  color: #C8960C;
  font-weight: 500;
  text-decoration: none;
}
.aned-msg-bot a:hover {
  text-decoration: underline;
}

/* Typing indicator */
.aned-typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 12px 20px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(27,58,107,0.08);
}
.aned-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #C8960C;
  animation: anedBounce 1.4s infinite ease-in-out;
}
.aned-typing span:nth-child(2) { animation-delay: 0.2s; }
.aned-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes anedBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Quick replies */
.aned-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
  background: #f8f9fb;
}
.aned-quick-btn {
  background: #fff;
  border: 1px solid rgba(27,58,107,0.15);
  color: #1B3A6B;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  transition: all 0.2s;
  white-space: nowrap;
}
.aned-quick-btn:hover {
  background: #1B3A6B;
  color: #fff;
  border-color: #1B3A6B;
}

/* Input area */
.aned-chat-input {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid rgba(0,0,0,0.06);
  background: #fff;
  gap: 10px;
  flex-shrink: 0;
}
.aned-chat-input input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
  color: #1B3A6B;
  background: transparent;
  padding: 8px 0;
}
.aned-chat-input input::placeholder {
  color: rgba(27,58,107,0.35);
}
.aned-chat-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #C8960C;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.aned-chat-send:hover {
  filter: brightness(110%);
}
.aned-chat-send svg {
  width: 16px;
  height: 16px;
  fill: #fff;
}

/* Mobile */
@media screen and (max-width: 480px) {
  .aned-chat-window {
    bottom: 0;
    right: 0;
    width: 100vw;
    height: 75vh;
    max-height: 75vh;
    border-radius: 16px 16px 0 0;
  }
  .aned-chat-toggle {
    bottom: 20px;
    right: 20px;
    width: 54px;
    height: 54px;
  }
  .aned-greeting {
    bottom: 84px;
    right: 20px;
    max-width: 240px;
    font-size: 13px;
  }
  .aned-mobile-btt {
    bottom: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
  }
}

/* ===================================================================
   COOKIE CONSENT
=================================================================== */
.aned-cookie-btn {
  position: fixed;
  bottom: 12px;
  left: 58px;
  z-index: 10000;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #C8960C;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 14px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}
.aned-cookie-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}
.aned-cookie-btn svg {
  width: 20px;
  height: 20px;
  fill: #fff;
  transition: fill 0.3s;
}

/* Cookie modal overlay */
.aned-cookie-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.aned-cookie-overlay.aned-visible {
  display: flex;
  animation: anedFadeIn 0.2s ease;
}
@keyframes anedFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Cookie modal */
.aned-cookie-modal {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(27,58,107,0.25);
  width: 440px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  font-family: 'Outfit', sans-serif;
  animation: anedSlideUp 0.3s ease;
}
.aned-cookie-modal::-webkit-scrollbar {
  width: 4px;
}
.aned-cookie-modal::-webkit-scrollbar-thumb {
  background: rgba(27,58,107,0.15);
  border-radius: 4px;
}

/* Modal header */
.aned-cookie-header {
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.aned-cookie-header h5 {
  color: #1B3A6B;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}
.aned-cookie-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
}
.aned-cookie-close svg {
  width: 18px;
  height: 18px;
  fill: rgba(0,0,0,0.3);
  transition: fill 0.2s;
}
.aned-cookie-close:hover svg {
  fill: #1B3A6B;
}

/* Modal body */
.aned-cookie-body {
  padding: 16px 24px;
}
.aned-cookie-body > p {
  color: rgba(0,0,0,0.5);
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 20px;
}
.aned-cookie-body a {
  color: #C8960C;
  text-decoration: none;
  font-weight: 500;
}
.aned-cookie-body a:hover {
  text-decoration: underline;
}

/* Cookie category */
.aned-cookie-cat {
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}
.aned-cookie-cat:hover {
  border-color: rgba(27,58,107,0.15);
}
.aned-cookie-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.aned-cookie-cat-info {
  flex: 1;
}
.aned-cookie-cat-info h6 {
  color: #1B3A6B;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 2px;
}
.aned-cookie-cat-info span {
  color: rgba(0,0,0,0.4);
  font-size: 11px;
}

/* Toggle switch */
.aned-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.aned-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.aned-toggle-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.12);
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.3s;
}
.aned-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.aned-toggle input:checked + .aned-toggle-slider {
  background: #C8960C;
}
.aned-toggle input:checked + .aned-toggle-slider::before {
  transform: translateX(20px);
}
.aned-toggle input:disabled + .aned-toggle-slider {
  background: #C8960C;
  opacity: 0.7;
  cursor: not-allowed;
}
.aned-toggle input:disabled:checked + .aned-toggle-slider::before {
  transform: translateX(20px);
}

/* Modal footer */
.aned-cookie-footer {
  padding: 8px 24px 24px;
  display: flex;
  gap: 10px;
}
.aned-cookie-save {
  flex: 1;
  background: #C8960C;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}
.aned-cookie-save:hover {
  filter: brightness(110%);
}
.aned-cookie-accept-all {
  background: #1B3A6B;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}
.aned-cookie-accept-all:hover {
  filter: brightness(120%);
}

@media screen and (max-width: 1200px) {
  .aned-cookie-btn {
    left: 20px;
  }
}
@media screen and (max-width: 480px) {
  .aned-cookie-btn {
    bottom: 20px;
    left: 16px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }
  .aned-cookie-modal {
    max-width: calc(100vw - 24px);
    border-radius: 12px;
  }
  .aned-cookie-footer {
    flex-direction: column;
  }
}
