/* Prospect Port Support Chat Widget - iMessage Style */

.pp-chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Toggle Button */
.pp-chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  color: white;
}

.pp-chat-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.5);
}

.pp-chat-toggle:active {
  transform: scale(0.95);
}

/* Chat Window */
.pp-chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 340px;
  height: 500px;
  background: #000;
  border-radius: 20px;
  overflow: hidden;
  display: none;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid #333;
}

.pp-chat-window.active {
  display: flex;
}

/* Chat Header */
.pp-chat-header {
  background: #1C1C1E;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #333;
}

.pp-chat-close {
  background: none;
  border: none;
  color: #007AFF;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.pp-chat-close:hover {
  opacity: 0.8;
}

.pp-chat-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.pp-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  padding: 2px;
}

.pp-chat-name {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

/* Chat Messages */
.pp-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pp-chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.4;
  word-wrap: break-word;
}

.pp-chat-received {
  background: #1C1C1E;
  color: #fff;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.pp-chat-bubble a {
  color: #007AFF;
  text-decoration: none;
}

.pp-chat-bubble a:hover {
  text-decoration: underline;
}

.pp-chat-bubble strong {
  color: #fff;
  font-weight: 600;
}

/* Chat Input Area */
.pp-chat-input-area {
  background: #1C1C1E;
  padding: 12px 16px;
  border-top: 1px solid #333;
}

.pp-chat-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pp-chat-input {
  flex: 1;
  background: #2C2C2E;
  border: none;
  border-radius: 20px;
  padding: 10px 16px;
  color: #8E8E93;
  font-size: 15px;
  outline: none;
}

.pp-chat-input::placeholder {
  color: #8E8E93;
}

.pp-chat-send {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #007AFF;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0.5;
}

/* Scrollbar styling */
.pp-chat-messages::-webkit-scrollbar {
  width: 6px;
}

.pp-chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.pp-chat-messages::-webkit-scrollbar-thumb {
  background: #48484A;
  border-radius: 3px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .pp-chat-widget {
    bottom: 10px;
    right: 10px;
  }
  
  .pp-chat-window {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
  
  .pp-chat-toggle {
    width: 50px;
    height: 50px;
  }
}
