/* FK Studio AI Department — Phase A Styles
   ====================================================================
   Loaded by index.html only if Phase A files are present.
   To activate visually: ensure these styles are also injected.
   For now: import from styles.css via @import or inline the rules below.
   ==================================================================== */

.aidept-section {
  padding: 1rem;
  max-width: 720px;
  margin: 0 auto;
}

.aidept-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 0.5rem;
}

.aidept-section-header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text-primary, #f0f0f5);
}

.aidept-section-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Dropdown (Mark as Lost ▾ / ⋯ More) */
.aidept-dropdown {
  position: relative;
  display: inline-block;
}
.aidept-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: #15151c;
  border: 1px solid #2a2a35;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  z-index: 100;
  min-width: 220px;
  padding: 0.25rem;
}
.aidept-dropdown-menu[hidden] {
  display: none !important;
}
.aidept-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: #f0f0f5;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
}
.aidept-dropdown-item:hover {
  background: #1f1f28;
}
.aidept-dropdown-item.aidept-danger {
  color: #ff8585;
}
.aidept-dropdown-item.aidept-danger:hover {
  background: rgba(255, 80, 80, .12);
}

.aidept-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.aidept-filters select,
.aidept-form input,
.aidept-form select,
.aidept-form textarea {
  background: #15151c;
  color: #f0f0f5;
  border: 1px solid #2a2a35;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font: inherit;
  width: 100%;
}

/* Fix native <option> styling for Chrome / Safari on dark backgrounds */
.aidept-filters select option,
.aidept-form select option {
  background: #15151c;
  color: #f0f0f5;
  padding: 0.25rem 0.5rem;
}

.aidept-form label {
  display: block;
  font-size: 0.875rem;
  color: #a0a0b0;
  margin-bottom: 0.75rem;
}

.aidept-form-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.aidept-form-row > label {
  flex: 1;
  min-width: 140px;
}

.aidept-lead-card {
  display: block;
  background: #15151c;
  border: 1px solid #2a2a35;
  border-radius: 12px;
  padding: 0.875rem;
  margin-bottom: 0.5rem;
  text-decoration: none;
  color: #f0f0f5;
  transition: border-color 120ms;
}

.aidept-lead-card:hover {
  border-color: #4a4a5f;
}

.aidept-lead-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.aidept-lead-card-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: #a0a0b0;
  margin-bottom: 0.25rem;
}

.aidept-lead-card-notes {
  font-size: 0.8125rem;
  color: #a0a0b0;
  font-style: italic;
  margin-top: 0.25rem;
}

.aidept-lead-info {
  background: #15151c;
  border-radius: 12px;
  padding: 0.875rem;
  display: grid;
  gap: 0.375rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.aidept-lead-info strong {
  color: #c0c0d0;
  margin-right: 0.25rem;
}

.aidept-lead-notes {
  grid-column: 1 / -1;
  border-top: 1px solid #2a2a35;
  padding-top: 0.5rem;
  margin-top: 0.25rem;
}

.aidept-messages {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.aidept-message {
  padding: 0.625rem 0.875rem;
  border-radius: 12px;
  font-size: 0.875rem;
  max-width: 92%;
}

.aidept-message--customer {
  background: #1a1a23;
  border: 1px solid #2a2a35;
  align-self: flex-start;
}

.aidept-message--ai {
  background: rgba(50, 80, 130, 0.18);
  border: 1px solid rgba(80, 110, 180, 0.4);
  align-self: flex-end;
}

.aidept-message--owner {
  background: rgba(40, 100, 60, 0.18);
  border: 1px solid rgba(80, 150, 100, 0.4);
  align-self: flex-end;
}

.aidept-message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
  margin-bottom: 0.375rem;
  color: #a0a0b0;
}

.aidept-message-body {
  color: #f0f0f5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.aidept-inbox-card {
  background: #15151c;
  border: 1px solid #2a2a35;
  border-radius: 12px;
  padding: 0.875rem;
  margin-bottom: 0.5rem;
}

.aidept-inbox-head {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.aidept-inbox-card h3 {
  margin: 0.25rem 0;
  font-size: 1rem;
}

.aidept-inbox-card details {
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

.aidept-inbox-card details pre {
  background: #0a0a10;
  padding: 0.5rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.75rem;
}

.aidept-inbox-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.aidept-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.aidept-badge--info { background: rgba(70, 130, 200, 0.25); color: #a0c8ff; }
.aidept-badge--success { background: rgba(70, 180, 110, 0.25); color: #a0e8c0; }
.aidept-badge--warn { background: rgba(220, 160, 70, 0.25); color: #f0d090; }
.aidept-badge--danger { background: rgba(220, 90, 90, 0.25); color: #f0a0a0; }
.aidept-badge--muted { background: rgba(150, 150, 170, 0.2); color: #b0b0c0; }

.aidept-nav-badge {
  display: inline-block;
  min-width: 18px;
  padding: 1px 6px;
  background: #d24545;
  color: white;
  border-radius: 9px;
  font-size: 0.6875rem;
  font-weight: 700;
  margin-left: 4px;
}

/* Respect [hidden] attribute when badge has no pending count */
.aidept-nav-badge[hidden] {
  display: none !important;
}

.muted { color: #888899; font-size: 0.875rem; }

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: #888899;
}

.empty-state p {
  margin: 0.5rem 0;
}
