/* HDM Asistan Widget Styles */
.hdm-chat-widget-icon {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #008131 0%, #006628 100%);
  color: white;
  padding: 16px 20px;
  border-radius: 50px;
  cursor: pointer;
  z-index: 9998;
  font-size: 14px;
  font-weight: 600;
  font-family: Inter, system-ui, sans-serif;
  box-shadow: 0 8px 25px rgba(0, 129, 49, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  min-width: 160px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.hdm-chat-widget-icon .icon {
  font-size: 20px;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.hdm-chat-widget-icon:hover {
  background: linear-gradient(135deg, #006628 0%, #004d1f 100%);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 129, 49, 0.5);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Chat Panel */
.hdm-chat-panel {
  position: fixed;
  bottom: 0;
  right: 20px;
  width: 380px;
  height: 600px;
  background-color: white;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
  z-index: 9999;
  font-family: Inter, system-ui, sans-serif;
  border: 1px solid rgba(0, 129, 49, 0.2);
}

.hdm-chat-panel.open {
  transform: translateY(0);
  opacity: 1;
}

.hdm-chat-panel iframe {
  width: 100%;
  height: calc(100% - 60px);
  border: none;
  background-color: #f0f2f5;
}

/* Chat Header */
.hdm-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: linear-gradient(135deg, #008131 0%, rgba(0, 129, 49, 0.9) 100%);
  color: white;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hdm-minimize-button {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
  line-height: 1;
}

.hdm-minimize-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .hdm-chat-panel.fullscreen {
    width: 100vw;
    height: 100vh;
    right: 0;
    border-radius: 0;
    border: none;
  }
  
  .hdm-chat-widget-icon {
    right: 15px;
    bottom: 15px;
    padding: 12px 16px;
    font-size: 13px;
    min-width: 140px;
  }
  
  .hdm-chat-widget-icon .icon {
    width: 24px;
    height: 24px;
    font-size: 18px;
  }
}

/* Loading State */
.hdm-chat-panel.loading iframe {
  background: linear-gradient(
    90deg,
    #f0f2f5 25%,
    #e0e4e7 50%,
    #f0f2f5 75%
  );
  background-size: 200% 100%;
  animation: loading 2s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .hdm-chat-panel {
    background-color: #1a1a1a;
    border-color: rgba(0, 129, 49, 0.3);
  }
  
  .hdm-chat-panel iframe {
    background-color: #2a2a2a;
  }
}

/* Animation for smooth entrance */
@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Accessibility */
.hdm-chat-widget-icon:focus,
.hdm-minimize-button:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .hdm-chat-widget-icon {
    border: 2px solid white;
  }
  
  .hdm-chat-panel {
    border: 2px solid #008131;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hdm-chat-panel,
  .hdm-chat-widget-icon {
    transition: none;
  }
  
  .hdm-chat-widget-icon::after {
    animation: none;
  }
}

/* Widget açıkken indikatörü gizle */
.hdm-chat-widget-icon.widget-open {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
