/* מצב מוסתר */
.hidden {
  display: none;
}

/* מעטפת כללית */
.dac-container {
  max-width: 480px;
  width: 100%;
  border-radius: 20px;
  background: linear-gradient(
    to bottom right,
    #ffffff 0%,
    #f8f9fc 40%,
    #f2f4ff 100%
  );
  box-shadow: 0 32px 64px rgba(22, 28, 45, 0.08);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", sans-serif;
  color: #1a1a1a;
  margin: 2rem auto;
  padding: 1.5rem 1.5rem 2rem;
  border: 1px solid rgba(0, 0, 0, 0.04);
  direction: rtl;
  text-align: right;
  box-sizing: border-box;
}

/* כותרת עליונה */
.dac-header {
  display: grid;
  row-gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.dac-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  color: #2a3a83;
  background: rgba(42, 58, 131, 0.08);
  border: 1px solid rgba(42, 58, 131, 0.18);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  width: fit-content;
}
.dac-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}
.dac-subtitle {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #4b5563;
}

/* כרטיס העניין הראשוני */
.dac-intake-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.04);
  padding: 1rem 1rem 1.25rem;
  display: grid;
  row-gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.dac-intake-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #1f2937;
  line-height: 1.4;
}

.dac-intake-textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  border: 1px solid #cfd3dc;
  background: #fdfdff;
  border-radius: 12px;
  padding: 0.9rem 0.9rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #1a1a1a;
  outline: none;
  box-sizing: border-box;
  direction: rtl;
  text-align: right;
}
.dac-intake-textarea:focus {
  border-color: #4254ff;
  box-shadow: 0 0 0 3px rgba(66,84,255,0.18);
  background: #ffffff;
}

.dac-intake-actions {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
}

.dac-send-btn {
  background: #4254ff;
  color: #ffffff;
  font-size: 0.9rem;
  line-height: 1.2;
  font-weight: 600;
  border: 0;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(66,84,255,0.28);
  transition: all 0.12s linear;
  white-space: nowrap;
}
.dac-send-btn:hover {
  background: #2a3a83;
  box-shadow: 0 20px 40px rgba(42,58,131,0.35);
}
.dac-send-btn:active {
  background: #1e2353;
  box-shadow: 0 10px 24px rgba(30,35,83,0.6);
}

.dac-disclaimer {
  font-size: 0.7rem;
  line-height: 1.5;
  color: #6b7280;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  box-sizing: border-box;
}

/* אזור השיחה שנפתח אחרי השליחה הראשונה */
.dac-chat-wrapper {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 24px 48px rgba(0,0,0,0.05);
  padding: 1rem 1rem 1.25rem;
  display: grid;
  row-gap: 0.75rem;
}

.dac-chat-heading {
  display: grid;
  row-gap: 0.25rem;
  border-bottom: 1px solid #f0f0f5;
  padding-bottom: 0.5rem;
}
.dac-chat-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
}
.dac-chat-note {
  font-size: 0.75rem;
  line-height: 1.4;
  color: #6b7280;
}

/* חלון ההודעות */
.dac-chat-window {
  background-color: #f9fafc;
  height: 320px;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  row-gap: 0.75rem;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-sizing: border-box;
}

/* בועה */
.dac-bubble {
  max-width: 80%;
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  line-height: 1.5;
  font-size: 0.9rem;
  word-break: break-word;
  white-space: pre-wrap;
  box-shadow: 0 10px 24px rgba(0,0,0,0.05);
  border: 1px solid transparent;
}
.dac-user {
  align-self: flex-end;
  background: linear-gradient(to bottom right, #4254ff 0%, #2a3a83 100%);
  color: #fff;
  border-color: rgba(255,255,255,0.18);
}
.dac-bot {
  align-self: flex-start;
  background: #ffffff;
  color: #1a1a1a;
  border-color: rgba(0,0,0,0.07);
}
