/* Dr. Habeas - WhatsApp-style chat interface */

:root {
  --dh-dark: #1B3B3A;
  --dh-medium: #2D5F5D;
  --dh-accent: #8BA672;
  --dh-light: #C5D4A0;
  --dh-gold: #C9A84C;
  --dh-bubble-system: #f0f0f0;
  --dh-bubble-user: #DCF8C6;
  --dh-bubble-user-dark: #25D366;
}

/* Hero Section */
.dh-hero {
  background: linear-gradient(135deg, var(--dh-dark) 0%, var(--dh-medium) 60%, #1a4a2e 100%);
  color: white;
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.dh-hero-badge {
  background: var(--dh-gold);
  color: #1B3B3A;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  display: inline-block;
  margin-bottom: 1.2rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dh-hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.dh-hero-subtitle {
  font-size: 1.2rem;
  color: var(--dh-light);
  font-weight: 600;
  margin-bottom: 1rem;
}

.dh-hero-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.dh-disclaimer {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

/* Buttons */
.dh-btn-primary {
  background: linear-gradient(135deg, var(--dh-gold), #e8b84b);
  color: #1B3B3A;
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(201,168,76,0.4);
}

.dh-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(201,168,76,0.5);
  color: #1B3B3A;
}

/* Features Section */
.dh-features-section {
  padding: 4rem 0;
  background: #f8fdf8;
}

.dh-feature-card {
  background: white;
  border: 1px solid #e8f0e3;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  height: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
}

.dh-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(27,59,58,0.1);
}

.dh-feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* Legal Section */
.dh-legal-section {
  padding: 4rem 0;
  background: white;
}

.dh-law-badge {
  background: var(--dh-dark);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-block;
}

/* Modal */
.dh-modal-content {
  border-radius: 16px;
  overflow: hidden;
  border: none;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.dh-modal-header {
  background: linear-gradient(135deg, var(--dh-dark), var(--dh-medium));
  color: white;
  padding: 1.2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dh-modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.dh-modal-subtitle {
  font-size: 0.8rem;
  color: var(--dh-light);
  margin: 0;
}

/* Progress Bar */
.dh-progress-container {
  background: #f0f0f0;
  padding: 0.7rem 1.2rem;
  border-bottom: 1px solid #e0e0e0;
}

.dh-progress-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dh-dark);
  margin-bottom: 0.4rem;
}

.dh-progress-bar-wrapper {
  background: #ddd;
  border-radius: 50px;
  height: 6px;
  overflow: hidden;
}

.dh-progress-bar {
  background: linear-gradient(90deg, var(--dh-medium), var(--dh-accent));
  height: 100%;
  border-radius: 50px;
  transition: width 0.4s ease;
}

/* Chat Area */
.dh-chat-area {
  background: #e5ddd5;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4c9c0' fill-opacity='0.3'%3E%3Ccircle cx='7' cy='7' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  min-height: 340px;
  max-height: 420px;
  overflow-y: auto;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  scroll-behavior: smooth;
}

.dh-chat-area::-webkit-scrollbar { width: 5px; }
.dh-chat-area::-webkit-scrollbar-track { background: transparent; }
.dh-chat-area::-webkit-scrollbar-thumb { background: #bbb; border-radius: 3px; }

/* Welcome State */
.dh-welcome-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  text-align: center;
  background: rgba(255,255,255,0.8);
  border-radius: 16px;
  padding: 2rem;
}

.dh-btn-start {
  background: var(--dh-dark);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.dh-btn-start:hover {
  background: var(--dh-medium);
  transform: scale(1.02);
}

/* Chat Bubbles */
.dh-msg-system {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  margin-right: 20%;
}

.dh-msg-user {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-left: 20%;
}

.dh-bubble-system {
  background: white;
  color: #333;
  padding: 0.75rem 1rem;
  border-radius: 0 12px 12px 12px;
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 100%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  white-space: pre-wrap;
  word-break: break-word;
}

.dh-bubble-user {
  background: var(--dh-bubble-user);
  color: #333;
  padding: 0.75rem 1rem;
  border-radius: 12px 0 12px 12px;
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 100%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  white-space: pre-wrap;
  word-break: break-word;
}

.dh-msg-time {
  font-size: 0.7rem;
  color: rgba(0,0,0,0.4);
  margin-top: 3px;
  text-align: right;
  padding: 0 0.2rem;
}

.dh-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--dh-dark);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

/* Typing indicator */
.dh-typing {
  display: flex;
  gap: 4px;
  padding: 0.8rem 1rem;
  background: white;
  border-radius: 0 12px 12px 12px;
  width: fit-content;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.dh-typing span {
  width: 8px;
  height: 8px;
  background: #aaa;
  border-radius: 50%;
  animation: dh-bounce 1.2s infinite;
}

.dh-typing span:nth-child(2) { animation-delay: 0.2s; }
.dh-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dh-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* Download Area */
.dh-download-area {
  background: #f0fff4;
  border-top: 1px solid #b2f5b2;
  padding: 1.5rem;
  text-align: center;
}

.dh-success-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.dh-btn-download {
  background: linear-gradient(135deg, #128C7E, #25D366);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 0.5rem;
  font-size: 1rem;
  transition: all 0.2s;
}

.dh-btn-download:hover {
  transform: scale(1.02);
  color: white;
}

.dh-btn-restart {
  background: transparent;
  color: var(--dh-dark);
  border: 2px solid var(--dh-dark);
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.dh-btn-restart:hover {
  background: var(--dh-dark);
  color: white;
}

/* Input Area */
.dh-input-area {
  background: #f0f0f0;
  padding: 0.8rem 1rem;
  border-top: 1px solid #ddd;
}

.dh-input-wrapper {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.dh-textarea {
  flex: 1;
  border: none;
  border-radius: 20px;
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  resize: none;
  background: white;
  outline: none;
  max-height: 100px;
  overflow-y: auto;
  line-height: 1.4;
  font-family: inherit;
}

.dh-textarea:focus {
  box-shadow: 0 0 0 2px rgba(45,95,93,0.3);
}

.dh-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--dh-medium);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s;
  flex-shrink: 0;
}

.dh-send-btn:hover {
  background: var(--dh-dark);
  transform: scale(1.05);
}

.dh-send-btn:disabled {
  background: #aaa;
  cursor: not-allowed;
  transform: none;
}

.dh-input-hint {
  font-size: 0.72rem;
  color: #999;
  margin-top: 0.4rem;
  text-align: center;
}

.dh-input-hint kbd {
  background: #e0e0e0;
  border-radius: 3px;
  padding: 0.1rem 0.3rem;
  font-size: 0.7rem;
}

/* Restart Mini Button */
.dh-restart-area {
  background: #f9f9f9;
  padding: 0.4rem 1rem;
  border-top: 1px solid #eee;
  text-align: right;
}

.dh-btn-mini-restart {
  background: transparent;
  color: #999;
  border: none;
  font-size: 0.78rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s;
}

.dh-btn-mini-restart:hover { color: var(--dh-dark); }

/* Responsive */
@media (max-width: 576px) {
  .dh-msg-system { margin-right: 5%; }
  .dh-msg-user { margin-left: 5%; }
  .dh-hero { padding: 3rem 0 2.5rem; }
}
