/* Chat Container */
.chat-container {
  width: 100%;
  max-width: 800px;
  height: 600px;
  background: #f6e9d1;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.chat-header {
  background: #3c2415;
  color: #fdf7e7;
  padding: 0px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 15px;
}

.header-avatar {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.header-avatar .persona-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.header-avatar .persona-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.3);
  color: white;
  font-weight: bold;
  font-size: 20px;
  border-radius: 50%;
}

.bot-icon {
  font-size: 24px;
}

.header-info h1 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.header-info p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

/* Messages Container */
.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: linear-gradient(to bottom, rgba(248, 250, 252, 0.5) 0%, white 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Custom scrollbar */
.messages-container::-webkit-scrollbar {
  width: 6px;
}

.messages-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Message Wrapper */
.message-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: slideIn 0.3s ease-out;
}

.ai-message {
  justify-content: flex-start;
}

.user-message {
  justify-content: flex-end;
}

/* Avatar */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  overflow: hidden;
}

/* Persona image */
.persona-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Persona fallback (first letter) */
.persona-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3c2415 0%, #3c2415 100%);
  color: white;
  font-weight: bold;
  font-size: 14px;
  border-radius: 50%;
}

.ai-message .avatar {
  color: white;
}

.user-message .avatar {
  color: white;
}

.user-icon {
  font-size: 14px;
}

/* User avatar image */
.user-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Message Content */
.message-content {
  display: flex;
  flex-direction: column;
}

.user-message .message-content {
  align-items: flex-end;
}

/* Message Bubble */
.message-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.message-bubble:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ai-bubble {
  background: #fdf7e7;
  color: #3c2415;
}

.user-bubble {
  background: #3c2415;
  color: #ffffff;
}

.message-bubble p {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

/* Message Time */
.message-time {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
  padding: 0 4px;
}

.user-message .message-time {
  text-align: right;
}

/* Answers Container (Outside chat container) */
.answers-container {
  width: 100%;
  max-width: 800px;
}

/* Products Container (Outside chat container) */
.products-container {
  width: 100%;
  max-width: 800px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  padding: 20px 0px;
}

/* Input Area */
.input-area {
  padding: 24px;
  background: white;
}

.input-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
}

.message-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  background: #f9fafb;
}

.message-input:focus {
  border-color: #3c2415;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: white;
}

.message-input::placeholder {
  color: #9ca3af;
}

.send-button {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #3c2415 0%, #2563eb 100%);
  border: none;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.send-button:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.send-button:active {
  transform: translateY(0);
}

.send-icon {
  font-size: 16px;
  font-weight: bold;
}

.input-hint {
  font-size: 11px;
  color: #6b7280;
  text-align: center;
  margin-top: 8px;
}

/* Inline Options Container - positioned within message content */
.gcc-inline-options-container {
  margin-top: 12px;
}

/* Inline Options - New styling for options under messages */
.gcc-inline-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.gcc-inline-option-btn {
  padding: 8px 16px;
  background: #fdf7e7;
  color: #3c2415;
  border: 1px solid #3c2415;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gcc-inline-option-btn:hover {
  background: #3c2415;
  color: #fdf7e7;
  border-color: #3c2415;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
}

.gcc-inline-option-btn:active {
  transform: translateY(0);
}

/* Predefined Answer Buttons */
.predefined-answers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding: 16px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.predefined-btn {
  padding: 8px 12px;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.predefined-btn:hover {
  background: #3c2415;
  color: white;
  border-color: #3c2415;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.predefined-btn:active {
  transform: translateY(0);
}

/* Legacy compatibility for existing chatbot functionality */
.chat-messages {
  min-height: 300px;
  max-height: 500px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding: 15px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chat-message {
  margin-bottom: 8px;
  animation: fadeIn 0.3s ease-in;
}

.chat-message.bot-message {
  text-align: left;
}

.chat-message.user-message {
  text-align: right;
}

.chat-message.bot-message .message-content {
  background: #f6e9d1;
  color: #2c3e50;
  border-radius: 18px 18px 18px 4px;
  display: inline-block;
  max-width: 80%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.chat-message.user-message .message-content {
  background: white;
  border: 1px solid #e5e7eb;
  color: #374151;
  padding: 12px 16px;
  border-radius: 18px 18px 4px 18px;
  display: inline-block;
  max-width: 80%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.gcc-answer-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

.gcc-option-btn {
  background: #fff;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.gcc-option-btn:hover {
  background: #3c2415;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

.gcc-typing-text {
  position: relative;
}

.gcc-typing-text::after {
  content: "|";
  animation: blink 1s infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

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

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

.persona-greeting {
  font-size: 16px;
  line-height: 1.4;
}

.persona-greeting strong {
  color: #f39c12;
}

/* Percentage input styling */
.gcc-percentage-input {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  border: 2px solid #e9ecef;
  margin: 15px 0;
  text-align: center;
}

/* Inline percentage input styling for predefined answers */
.gcc-percentage-input-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  font-size: 12px;
  margin: 5px 0;
  flex-wrap: wrap;
}

.gcc-percentage-input-inline .percentage-label {
  color: #374151;
  font-weight: 500;
  white-space: nowrap;
}

.gcc-percentage-input-inline input {
  width: 50px;
  padding: 4px 6px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 12px;
  text-align: center;
  background: #f9fafb;
  margin: 0;
}

.gcc-percentage-input-inline input:focus {
  outline: none;
  border-color: #3c2415;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
  background: white;
}

.gcc-percentage-input-inline .percentage-symbol {
  color: #6b7280;
  font-weight: 500;
  margin-left: -2px;
}

.gcc-percentage-input-inline .gcc-percentage-confirm {
  padding: 4px 8px;
  font-size: 14px;
  margin: 0;
  min-width: 50px;
  background: #28a745;
  border-color: #28a745;
  color: white;
  border-radius: 15px;
  transition: all 0.2s ease;
}

.gcc-percentage-input-inline .gcc-percentage-confirm:hover {
  background: #218838;
  border-color: #1e7e34;
  transform: translateY(-1px);
}

.percentage-input-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 15px 0;
}

.percentage-input-wrapper input {
  width: 80px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  text-align: center;
}

.percentage-input-wrapper span {
  font-size: 16px;
  font-weight: 500;
  color: #495057;
}

.gcc-percentage-input label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #495057;
}

#percentage-slider {
  width: 100%;
  margin: 15px 0;
  height: 8px;
  border-radius: 5px;
  background: #ddd;
  outline: none;
  -webkit-appearance: none;
}

#percentage-slider::-webkit-slider-thumb {
  appearance: none;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #3c2415;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
}

#percentage-slider::-moz-range-thumb {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #3c2415;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
}

#percentage-value {
  display: inline-block;
  font-size: 24px;
  font-weight: bold;
  color: #3c2415;
  margin: 10px 0;
}

.gcc-percentage-confirm {
  background: #28a745 !important;
  border-color: #28a745 !important;
  color: white !important;
}

.gcc-percentage-confirm:hover {
  background: #218838 !important;
  border-color: #1e7e34 !important;
}

/* Exchange rate info */
.gcc-exchange-info {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 5px;
}

.gcc-exchange-info small {
  font-weight: 400;
  font-size: 10px;
}

/* Option descriptions */
.gcc-option-btn small {
  display: block;
  font-size: 12px;
  opacity: 0.7;
  margin-top: 5px;
}

/* Budget options with RSD */
.gcc-option-btn[data-question="budget"] {
  justify-content: space-between;
  align-items: center;
  padding: 10px 10px;
}

.gcc-option-btn[data-question="budget"] .rsd-amount {
  font-size: 14px;
  opacity: 0.7;
  font-weight: normal;
}

/* Product list styling - compact version */
.gcc-product-list-compact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
}

.gcc-product-item-compact {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 12px;
  transition: all 0.3s ease;
}

.gcc-product-item-compact:hover {
  background: #e9ecef;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gcc-product-info-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}

.gcc-product-name {
  font-weight: 600;
  color: #3c2415;
  font-size: 14px;
  flex: 1;
  min-width: 120px;
}

.gcc-product-details {
  color: #3c2415;
  font-size: 12px;
  flex: 1;
  min-width: 100px;
}

.gcc-product-price-compact {
  font-weight: bold;
  color: #3c2415;
  font-size: 14px;
  min-width: 80px;
}

.gcc-product-quantity-display {
  color: #3c2415;
  font-size: 12px;
  min-width: 70px;
}

/* Legacy product list styling */
.gcc-product-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 15px;
}

.gcc-product-item {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 15px;
  transition: all 0.3s ease;
}

.gcc-product-item:hover {
  background: #e9ecef;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gcc-product-info h4 {
  margin: 0 0 8px 0;
  color: #2c3e50;
  font-size: 16px;
}

.gcc-product-weight,
.gcc-product-type,
.gcc-product-price {
  margin: 5px 0;
  font-size: 14px;
}

.gcc-product-price {
  font-weight: bold;
  color: #3c2415;
  font-size: 16px;
}

.gcc-product-total-price {
  color: #3c2415;
  font-size: 14px;
}

.gcc-product-quantity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.gcc-quantity-input {
  width: 60px;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-align: center;
}

/* Total section */
.gcc-total-section {
  background: #f6e9d1;
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
  text-align: center;
  margin-left: 15px;
  margin-right: 15px;
}

.gcc-total-value {
  font-size: 18px;
  color: #2c3e50;
}

.gcc-total-value small {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  opacity: 0.7;
}

/* CTA buttons */
.gcc-cta-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  margin-bottom: 20px;
}

.gcc-cta-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  margin-left: 15px;
  margin-right: 15px;
}

.gcc-cta-btn.gcc-primary {
  background: #3c2415;
  color: #fdf7e7;
}

.gcc-cta-btn.gcc-primary:hover {
  background: #fdf7e7;
  color: #3c2415;
  transform: translateY(-2px);
}

.gcc-cta-btn.gcc-secondary {
  background: #6c757d;
  color: white;
}

.gcc-cta-btn.gcc-secondary:hover {
  background: #545b62;
  transform: translateY(-2px);
}

.gcc-cta-btn.gcc-tertiary {
  background: #f8f9fa;
  color: #6c757d;
  border: 1px solid #dee2e6;
}

.gcc-cta-btn.gcc-tertiary:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

/* Contact form styling */
.gcc-contact-form {
  padding: 20px;
  border-radius: 10px;
  margin: 20px 0;
}

.gcc-form-group {
  margin-bottom: 15px;
}

.gcc-form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #2c3e50;
}

.gcc-form-group input,
.gcc-form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  box-sizing: border-box;
}

.gcc-form-group input:focus,
.gcc-form-group textarea:focus {
  outline: none;
  border-color: #3c2415;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.gcc-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.gcc-submit-btn {
  flex: 1;
  padding: 12px 20px;
  background: #3c2415;
  color: #fdf7e7;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gcc-submit-btn:hover {
  background: #fdf7e7;
  color: #3c2415;
}

.gcc-submit-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.gcc-cancel-btn {
  padding: 12px 20px;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gcc-cancel-btn:hover {
  background: #545b62;
}

.gcc-success-message {
  background: #d4edda;
  color: #155724;
  padding: 15px;
  border-radius: 5px;
  text-align: center;
  font-weight: 500;
  border: 1px solid #c3e6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .chat-container {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .chat-header {
    padding: 0 10px;
  }

  .messages-container {
    padding: 16px;
  }

  .answers-container {
    margin: 20px 10px 0;
    padding: 16px;
    border-radius: 15px;
  }

  .products-container {
    margin: 20px 10px 0;
    padding: 16px;
    border-radius: 15px;
  }

  .input-area {
    padding: 16px;
  }

  .message-content {
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  .header-info h1 {
    font-size: 18px;
  }

  .message-content {
    max-width: 240px;
  }

  .message-bubble {
    padding: 10px 14px;
  }

  .gcc-product-info-compact {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .gcc-product-name,
  .gcc-product-details,
  .gcc-product-price-compact,
  .gcc-product-quantity-display {
    min-width: auto;
  }

  .gcc-product-item-compact {
    padding: 10px;
  }

  .gcc-product-name {
    font-size: 13px;
  }

  .gcc-product-details {
    font-size: 11px;
  }

  .gcc-product-price-compact {
    font-size: 13px;
  }

  .gcc-product-quantity-display {
    font-size: 11px;
  }

  .gcc-inline-option-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* Calendly Container */
.gcc-calendly-container {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gcc-calendly-header {
  background: #3c2415;
  color: #fdf7e7;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gcc-calendly-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
}

.gcc-close-calendly {
  background: none;
  border: none;
  color: #fdf7e7;
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.gcc-close-calendly:hover {
  background: rgba(255, 255, 255, 0.1);
}

.gcc-calendly-container iframe {
  display: block;
  border: none;
  width: 100%;
  min-height: 650px;
  background: white;
}

@media (max-width: 768px) {
  .gcc-calendly-container iframe {
    height: 500px;
  }

  .gcc-calendly-header {
    padding: 12px 16px;
  }

  .gcc-calendly-header h3 {
    font-size: 16px;
  }
}
