/* Chatbot Stylesheet - Scoped under .ark-chatbot to prevent conflict with other elements */

.ark-chatbot {
  --navy-deep: #050d1a;
  --navy: #0a1628;
  --navy-mid: #122a47;
  --navy-light: #1e3d66;
  --gold: #c9a962;
  --gold-light: #e4d4a8;
  --gold-dark: #9a7b3a;
  --white: #ffffff;
  --text-muted: #94a3b8;
  --text-body: #cbd5e1;
  --shadow-gold: 0 4px 20px rgba(201, 169, 98, 0.35);
  --shadow-chat: 0 12px 40px rgba(0, 0, 0, 0.5);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Inter", system-ui, sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Premium Floating Launcher styled as a glowing gold orb */
.ark-chatbot-launcher {
  position: fixed;
  bottom: 7.5rem; /* Stacked above the WhatsApp button at 2rem */
  right: 2rem;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gold-light) 0%, var(--gold) 45%, var(--gold-dark) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: var(--navy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 998;
  animation: orbGlow 3s infinite ease-in-out;
  transition: transform var(--transition), opacity var(--transition);
}

.ark-chatbot-launcher:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 6px 30px rgba(201, 169, 98, 0.8), 0 0 20px rgba(255, 255, 255, 0.4);
}

.ark-chatbot-launcher svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
  filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));
}

@keyframes orbGlow {
  0% { 
    box-shadow: 0 4px 20px rgba(201, 169, 98, 0.45), 0 0 10px rgba(201, 169, 98, 0.25); 
    border-color: rgba(255, 255, 255, 0.25);
  }
  50% { 
    box-shadow: 0 4px 30px rgba(201, 169, 98, 0.8), 0 0 25px rgba(201, 169, 98, 0.6); 
    border-color: rgba(255, 255, 255, 0.55);
  }
  100% { 
    box-shadow: 0 4px 20px rgba(201, 169, 98, 0.45), 0 0 10px rgba(201, 169, 98, 0.25); 
    border-color: rgba(255, 255, 255, 0.25);
  }
}

/* Launcher Notification Badge */
.ark-chatbot-launcher-badge {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 14px;
  height: 14px;
  background: #ff3333;
  border: 2px solid var(--white);
  border-radius: 50%;
  animation: badgePulse 2s infinite;
  box-shadow: 0 0 8px #ff3333;
}

@keyframes badgePulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 51, 51, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(255, 51, 51, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 51, 51, 0); }
}

/* WhatsApp floating button style */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
  transition: transform 0.3s;
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  color: white;
}
.whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

/* Chat Window Container */
.ark-chatbot-window {
  position: fixed;
  bottom: 7.5rem;
  right: 2rem;
  width: 385px;
  height: 600px;
  max-height: 80vh;
  border-radius: 12px;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(201, 169, 98, 0.25);
  box-shadow: var(--shadow-chat), var(--shadow-gold);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
}

.ark-chatbot-window.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Dedicated full-page embedded chat inside #arkShowcaseChatContainer (about-ark.html) */
.support-chat-wrapper .ark-chatbot-window {
  position: static !important;
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  background: transparent !important; /* Managed by parent container */
}

.support-chat-wrapper .ark-chatbot-close-btn {
  display: none !important; /* Hide close button on full page */
}

/* Chat Header */
.ark-chatbot-header {
  padding: 1rem 1.25rem;
  background: var(--navy-mid);
  border-bottom: 1px solid rgba(201, 169, 98, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ark-chatbot-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ark-chatbot-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: var(--navy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.ark-chatbot-header-text h3 {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--white);
  font-weight: 600;
  line-height: 1.2;
}

.ark-chatbot-status {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ark-chatbot-status::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #25d366; /* Online green */
  box-shadow: 0 0 6px #25d366;
}

.ark-chatbot-close-btn {
  color: var(--gold);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.25rem;
  cursor: pointer;
  transition: color var(--transition), transform var(--transition);
}

.ark-chatbot-close-btn:hover {
  color: var(--gold-light);
  transform: scale(1.1);
}

/* Message List Area */
.ark-chatbot-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  scroll-behavior: smooth;
}

/* Custom Scrollbar for messages */
.ark-chatbot-messages::-webkit-scrollbar {
  width: 6px;
}
.ark-chatbot-messages::-webkit-scrollbar-track {
  background: transparent;
}
.ark-chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(201, 169, 98, 0.2);
  border-radius: 3px;
}
.ark-chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(201, 169, 98, 0.4);
}

/* Individual Message Layout */
.ark-chatbot-msg-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}

.ark-chatbot-msg-wrapper.user {
  align-self: flex-end;
}

.ark-chatbot-msg-wrapper.assistant {
  align-self: flex-start;
}

.ark-chatbot-msg {
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.55;
  border-radius: 12px;
}

.ark-chatbot-msg-wrapper.user .ark-chatbot-msg {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--navy-deep);
  border-bottom-right-radius: 0;
  box-shadow: 0 3px 10px rgba(201, 169, 98, 0.15);
  font-weight: 500;
}

.ark-chatbot-msg-wrapper.assistant .ark-chatbot-msg {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(201, 169, 98, 0.15);
  color: var(--text-body);
  border-bottom-left-radius: 0;
}

/* Styles for lists/formatting inside chatbot messages */
.ark-chatbot-msg ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0.5rem;
}
.ark-chatbot-msg ul li {
  margin-bottom: 0.35rem;
  padding-left: 1rem;
  position: relative;
}
.ark-chatbot-msg ul li::before {
  content: "✦";
  color: var(--gold);
  position: absolute;
  left: 0;
  font-size: 0.7rem;
  top: 0.1rem;
}

.ark-chatbot-timestamp {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  margin-left: 0.25rem;
}

.ark-chatbot-msg-wrapper.user .ark-chatbot-timestamp {
  text-align: right;
  margin-right: 0.25rem;
}

/* Suggestion Chips Container */
.ark-chatbot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.ark-chatbot-chip {
  padding: 0.45rem 0.85rem;
  background: rgba(201, 169, 98, 0.08);
  border: 1px solid rgba(201, 169, 98, 0.25);
  color: var(--gold-light);
  font-family: var(--font-sans);
  font-size: 0.78125rem;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.ark-chatbot-chip:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy-deep);
  transform: translateY(-1px);
}

/* Project Cards Inside Chat */
.ark-chatbot-project-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  margin-top: 0.75rem;
}

.support-chat-wrapper .ark-chatbot-project-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.ark-chatbot-project-card {
  background: rgba(5, 13, 26, 0.7);
  border: 1px solid rgba(201, 169, 98, 0.2);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), transform var(--transition);
}

.ark-chatbot-project-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.ark-chatbot-project-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
}

.ark-chatbot-project-details {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex-grow: 1;
}

.ark-chatbot-project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.ark-chatbot-project-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
}

.ark-chatbot-project-status {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0.15rem 0.4rem;
  border: 1.5px solid var(--gold);
  border-radius: 2px;
  font-weight: 600;
  white-space: nowrap;
}

.ark-chatbot-project-desc {
  font-family: var(--font-sans);
  font-size: 0.78125rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.ark-chatbot-project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.ark-chatbot-project-meta span {
  font-size: 0.6875rem;
  padding: 0.15rem 0.45rem;
  border: 1px solid rgba(201, 169, 98, 0.2);
  color: var(--gold-light);
  background: rgba(201, 169, 98, 0.04);
}

.ark-chatbot-project-btn {
  margin-top: 0.75rem;
  width: 100%;
  padding: 0.5rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--navy-deep);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: opacity var(--transition);
}

.ark-chatbot-project-btn:hover {
  opacity: 0.9;
}

/* Typing Indicator Animation */
.ark-chatbot-typing {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem !important;
}

.ark-chatbot-typing-dot {
  width: 6px;
  height: 6px;
  background-color: var(--text-muted);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.ark-chatbot-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.ark-chatbot-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Chat Input Form */
.ark-chatbot-input-area {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(201, 169, 98, 0.15);
  background: var(--navy);
}

.ark-chatbot-form {
  display: flex;
  gap: 0.75rem;
}

.ark-chatbot-input {
  flex-grow: 1;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(201, 169, 98, 0.2);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  border-radius: 4px;
  transition: border-color var(--transition);
}

.ark-chatbot-input::placeholder {
  color: var(--text-muted);
}

.ark-chatbot-input:focus {
  outline: none;
  border-color: var(--gold);
}

.ark-chatbot-send-btn {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--navy-deep);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), opacity var(--transition);
}

.ark-chatbot-send-btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.ark-chatbot-send-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transform: rotate(-45deg) translate(1px, -1px);
}

/* Responsive Style Adjustments */
@media (max-width: 480px) {
  .ark-chatbot-launcher {
    bottom: 6.5rem;
    right: 1.25rem;
  }
  .ark-chatbot-window {
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0;
    border: none;
  }
  .ark-chatbot-header {
    padding-top: calc(1rem + env(safe-area-inset-top, 0));
  }
  .ark-chatbot-input-area {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0));
  }
}


/* ==========================================
   ARK Infra Footer Styling (Global)
   ========================================== */
.site-footer {
  background: var(--navy-deep);
  border-top: 1px solid rgba(201, 169, 98, 0.15);
  padding: 4rem 1.5rem 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  max-width: var(--max-w);
  margin: 0 auto 3rem;
}
.footer-brand p {
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  max-width: 20rem;
  line-height: 1.7;
}
.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.footer-social a {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(201, 169, 98, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
}
.footer-social a:hover {
  background: var(--gold);
  color: var(--navy-deep);
}
.footer-col h4 {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}
.footer-col ul li {
  margin-bottom: 0.65rem;
}
.footer-col a {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.footer-col a:hover {
  color: var(--gold);
}
.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(201, 169, 98, 0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.footer-legal {
  display: flex;
  gap: 1.5rem;
}
.footer-legal a:hover {
  color: var(--gold);
}