/* ==========================================================================
   PRIME RADIANT - CHAT WIDGET STYLES
   ========================================================================== */

/* Button next to contact email */
.contact-chat-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.75rem;
  padding: 0.65rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #a5edff;
  background: rgba(165, 237, 255, 0.06);
  border: 1px solid rgba(165, 237, 255, 0.25);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  vertical-align: middle;
  backdrop-filter: blur(8px);
}

.contact-chat-btn:hover {
  background: rgba(165, 237, 255, 0.15);
  border-color: rgba(165, 237, 255, 0.5);
  box-shadow: 0 0 16px rgba(165, 237, 255, 0.2);
  transform: translateY(-1px);
}

.contact-chat-btn .chat-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Floating Chat Panel Container */
.pr-chat-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 380px;
  max-width: calc(100vw - 2rem);
  height: 540px;
  max-height: calc(100vh - 4rem);
  background: rgba(10, 12, 22, 0.92);
  border: 1px solid rgba(198, 204, 255, 0.18);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(140, 139, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.96);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.pr-chat-widget.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Chat Header */
.pr-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(15, 17, 32, 0.9);
  border-bottom: 1px solid rgba(198, 204, 255, 0.12);
}

.pr-chat-header-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pr-chat-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6ee7b7;
  box-shadow: 0 0 8px #6ee7b7;
}

.pr-chat-title-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: -0.01em;
}

.pr-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pr-chat-lang-btn,
.pr-chat-close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pr-chat-lang-btn:hover,
.pr-chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

/* Privacy Notice */
.pr-chat-privacy-notice {
  font-size: 0.72rem;
  color: #64748b;
  padding: 0.4rem 1.25rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

/* Messages Body */
.pr-chat-messages {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
  position: relative;
}

.pr-chat-messages::-webkit-scrollbar {
  width: 5px;
}
.pr-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

/* Message Bubbles */
.pr-msg {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.5;
  word-wrap: break-word;
  white-space: pre-wrap;
  animation: fadeInMsg 0.25s ease-out forwards;
}

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

.pr-msg-assistant {
  align-self: flex-start;
  background: rgba(26, 30, 54, 0.85);
  color: #e2e8f0;
  border: 1px solid rgba(140, 139, 255, 0.15);
  border-top-left-radius: 4px;
}

.pr-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(140, 139, 255, 0.25), rgba(165, 237, 255, 0.25));
  color: #ffffff;
  border: 1px solid rgba(165, 237, 255, 0.3);
  border-top-right-radius: 4px;
}

/* Typing Indicator */
.pr-typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0.6rem 0.9rem;
  background: rgba(26, 30, 54, 0.6);
  border-radius: 12px;
  align-self: flex-start;
  width: fit-content;
}

.pr-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a5edff;
  animation: prPulse 1.2s infinite ease-in-out;
}

.pr-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.pr-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes prPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.1); }
}

/* Chat Footer & Input Controls */
.pr-chat-footer {
  padding: 0.85rem 1.25rem 1rem;
  background: rgba(15, 17, 32, 0.95);
  border-top: 1px solid rgba(198, 204, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pr-chat-input-row {
  display: flex;
  gap: 0.5rem;
}

.pr-chat-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(198, 204, 255, 0.2);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  color: #f8fafc;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.pr-chat-input:focus {
  border-color: rgba(165, 237, 255, 0.5);
  box-shadow: 0 0 8px rgba(165, 237, 255, 0.15);
}

.pr-chat-send-btn {
  background: #8c8bff;
  color: #07080f;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 0 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pr-chat-send-btn:hover {
  background: #a5edff;
  box-shadow: 0 0 12px rgba(165, 237, 255, 0.3);
}

.pr-chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Action Footer (Finish and send button) */
.pr-chat-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pr-chat-finish-btn {
  width: 100%;
  background: rgba(214, 176, 116, 0.12);
  border: 1px solid rgba(214, 176, 116, 0.3);
  color: #d6b074;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.pr-chat-finish-btn:hover {
  background: rgba(214, 176, 116, 0.25);
  color: #fce7f3;
  border-color: rgba(214, 176, 116, 0.6);
}

/* Floating Launcher Toggle Button (fixed bottom right - Prime Radiant Golden Core) */
.pr-chat-launcher {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f4d088 0%, #d6b074 55%, #9a7232 100%);
  color: #07080f;
  border: 1px solid rgba(255, 225, 168, 0.6);
  box-shadow: 0 8px 24px rgba(214, 176, 116, 0.45), 0 0 20px rgba(244, 208, 136, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pr-chat-launcher:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 30px rgba(214, 176, 116, 0.65), 0 0 30px rgba(244, 208, 136, 0.5);
}

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

/* Contact Info Modal Form Overlay */
.pr-contact-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 12, 22, 0.95);
  backdrop-filter: blur(12px);
  z-index: 10;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  animation: fadeInMsg 0.25s ease-out forwards;
}

.pr-contact-overlay-title {
  font-size: 1rem;
  font-weight: 600;
  color: #f8fafc;
  text-align: center;
  margin-bottom: 0.25rem;
}

.pr-contact-overlay-subtitle {
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: center;
  margin-bottom: 0.5rem;
}

.pr-contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pr-contact-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #cbd5e1;
}

.pr-contact-input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(198, 204, 255, 0.2);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  color: #f8fafc;
  font-size: 0.85rem;
  outline: none;
}

.pr-contact-input:focus {
  border-color: #a5edff;
}

.pr-contact-submit-btn {
  background: linear-gradient(135deg, #8c8bff, #6366f1);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.65rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: all 0.2s ease;
}

.pr-contact-submit-btn:hover {
  box-shadow: 0 0 16px rgba(140, 139, 255, 0.4);
  transform: translateY(-1px);
}

.pr-contact-cancel-btn {
  background: transparent;
  color: #64748b;
  border: none;
  font-size: 0.75rem;
  cursor: pointer;
  text-align: center;
}

.pr-contact-cancel-btn:hover {
  color: #94a3b8;
}
