.fixed-button {
  position: fixed;
  bottom: 10px;
  right: 10px;
  width: min(450px, calc(100vw - 20px));
  max-width: 450px;
  height: auto;
  transition: height 0.5s ease-in-out;
  z-index: 999999;
  display: none;
}
.start-chat-button {
  /* background: linear-gradient(90deg, #c5be73 -37.67%, #68d7d7 54.25%); */
  box-shadow: 0px 4px 6px 0px rgba(0, 0, 0, 0.25);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
  height: 46px;
  text-shadow:
    0px 1px 1px rgba(0, 0, 0, 0.4),
    0px 2px 3px rgba(0, 0, 0, 0.3),
    0px 3px 5px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.start-chat-button:hover {
  transform: translateY(-2px);
  box-shadow: 0px 6px 8px 0px rgba(0, 0, 0, 0.3);
}
.start-chat-button:active {
  transform: translateY(1px);
  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.2);
}
.start-chat-button.disabled {
  background: linear-gradient(
    90deg,
    #c5be73 -37.67%,
    #68d7d7 54.25%,
    #b3c68d 133.78%
  );
  cursor: not-allowed;
  opacity: 0.7;
}
.start-chat-button.gradient1 {
  background: linear-gradient(90deg, #695ecc, #52abcb);
}
.start-chat-button.gradient2 {
  background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
}
.start-chat-button.gradient3 {
  background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
}
.start-chat-button.gradient4 {
  background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
}
.start-chat-button.gradient5 {
  background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
}
.start-chat-button.gradient6 {
  background: linear-gradient(135deg, #f953c6 0%, #b91d73 100%);
}
.chat {
  overflow: hidden;
  border-radius: 8px;
  position: fixed;
  bottom: 0;
  right: 20px;
  width: min(450px, calc(100vw - 40px));
  max-width: 450px;
  height: min(580px, calc(100vh - 40px));
  transition: height 0.5s ease-in-out;
  z-index: 999999;
  display: none;
  left: auto;
}
.chat iframe {
  border: none;
  width: 100%;
  height: 100%;
}
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 7px 15px;
  color: white;
  font-weight: bold;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}
.chat-header-content {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-header-logo {
  height: 50px;
  width: auto;
  display: block;
  max-height: min(50px, 8vw);
}
.chat-header-title {
  font-size: clamp(14px, 4vw, 16px);
}
.chat-header.gradient1 {
  background: linear-gradient(90deg, #695ecc, #52abcb);
}
.chat-header.gradient2 {
  background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
}
.chat-header.gradient3 {
  background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
  color: #333;
}
.chat-header.gradient4 {
  background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
}
.chat-header.gradient5 {
  background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
  color: #333;
}
.chat-header.gradient6 {
  background: linear-gradient(135deg, #f953c6 0%, #b91d73 100%);
}
.chat-header .finish-button {
  background-color: transparent;
  border: none;
  color: inherit;
  padding: 0;
  font-size: clamp(18px, 5vw, 20px);
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.3s ease-in-out;
  line-height: 1;
  opacity: 0.7;
  min-width: 24px;
  min-height: 24px;
}
.chat-header .finish-button:hover {
  background-color: transparent;
  opacity: 1;
}
.chat-content {
  display: block;
  height: calc(100% - 70px);
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.3) 0%,
    transparent 20%,
    transparent 80%,
    rgba(255, 255, 255, 0.3) 100%
  );
  backdrop-filter: blur(8px) saturate(150%);
}
.chat.minimized {
  height: min(70px, 15vw);
}
.chat.minimized .chat-content {
  display: none;
}
.confirmation-dialog {
  position: fixed;
  bottom: 20px;
  right: 80px;
  width: min(300px, calc(100vw - 80px));
  max-width: 300px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  padding: 20px;
  text-align: center;
  z-index: 999999;
  display: none;
}
.confirmation-dialog p {
  margin-bottom: 15px;
  color: #333;
  font-size: clamp(14px, 4vw, 16px);
}
.confirmation-dialog button {
  margin: 5px;
  padding: clamp(8px, 2vw, 10px) clamp(16px, 4vw, 20px);
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  font-weight: bold;
  min-width: clamp(70px, 20vw, 80px);
  font-size: clamp(12px, 3.5vw, 14px);
}
.confirmation-dialog .yes-button {
  background-color: #ef4444;
}
.confirmation-dialog .yes-button:hover {
  background-color: #dc2626;
}
.confirmation-dialog .no-button {
  background-color: #e5e7eb;
  color: #374151;
}
.confirmation-dialog .no-button:hover {
  background-color: #d1d5db;
}

/* RESPONSIVE: Mobile-specific adjustments */
@media (max-width: 480px) {
  .chat {
    right: 10px;
    left: 10px;
    width: auto;
    max-width: none;
    padding: 8px;
    height: min(70vh, 500px);
  }

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

  .confirmation-dialog {
    right: 30px;
    left: 30px;
    width: auto;
    max-width: none;
    bottom: 15px;
    margin-right: 0;
  }

  .confirmation-dialog button {
    display: block;
    width: 100%;
    margin: 8px 0;
  }

  .fixed-button {
    bottom: 20px;
    right: 10px;
    left: 10px;
    width: auto;
    max-width: none;
  }

  .start-chat-button {
    font-size: 14px;
    padding: 16px 12px;
    height: 50px;
  }
}

/* RESPONSIVE: Very small screens */
@media (max-width: 320px) {
  .chat {
    right: 5px;
    left: 5px;
    padding: 6px;
  }

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

  .confirmation-dialog {
    padding: 15px;
    right: 20px;
    left: 20px;
  }
}
