/* Bangladesh Legal Assistant — Unified Design System */
:root {
  --primary-color: #006a4e;
  --primary-dark: #004d38;
  --primary-light: #e6f2ed;
  --accent-red: #f42a41;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border-color: #cbd5e1;
  --warning-bg: #fffbeb;
  --warning-border: #f59e0b;
  --success-bg: #ecfdf5;
  --success-border: #10b981;
  --font-family: 'Noto Sans Bengali', 'Hind Siliguri', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-dark);
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.85;
  padding-bottom: 40px;
}

.app-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header & Banner */
.app-header, .header {
  background: linear-gradient(135deg, #006a4e 0%, #004d38 100%);
  color: white;
  padding: 32px 24px 20px 24px;
  border-radius: 0 0 20px 20px;
  margin-bottom: 24px;
  box-shadow: 0 6px 20px rgba(0,106,78,0.15);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-badge {
  font-size: 2.2rem;
  background: rgba(255,255,255,0.15);
  padding: 8px 14px;
  border-radius: 14px;
}

.app-title, .header-title {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.app-subtitle, .header-subtitle {
  font-size: 0.95rem;
  opacity: 0.9;
}

.header-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.trust-badge {
  background: rgba(255,255,255,0.18);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;

}

/* Tab Navigation Bar */
.nav-tabs, .tab-bar {
  display: flex;
  gap: 8px;
  background: rgba(0,0,0,0.15);
  padding: 6px;
  border-radius: 12px;
}

.tab-btn {
  flex: 1;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 600;
  background: transparent;
  color: rgba(255,255,255,0.85);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.tab-btn.active {
  background: white;
  color: var(--primary-dark);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Tab Content Panes */
.tab-content.hidden {
  display: none !important;
}

/* Search Card & Input */
.search-card, .search-section {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.search-label {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.input-wrapper, .search-box {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.query-textarea, .search-input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 1.05rem;
  font-family: inherit;
  resize: vertical;
  min-height: 70px;
  transition: border-color 0.2s;
}

.query-textarea:focus, .search-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.search-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0 28px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.search-btn:hover {
  background: var(--primary-dark);
}

/* Quick Chips */
.chips-container, .quick-questions {
  margin-top: 14px;
}

.chips-label, .quick-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}

.chip-btn, .chip {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  color: var(--text-dark);
  margin-right: 6px;
  margin-bottom: 8px;
}

.chip-btn:hover, .chip:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Results & Accordions */
.results-area.hidden {
  display: none !important;
}

.result-status-header {
  margin-bottom: 18px;
}

.status-pill {
  display: inline-block;
  background: #dcfce7;
  color: #15803d;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.result-title {
  font-size: 1.4rem;
  color: var(--primary-dark);
  font-weight: 700;
}

.accordions-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion-item, .section {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.accordion-header, .section-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #f8fafc;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.2s;
}

.accordion-header:hover, .section-header:hover {
  background: #f1f5f9;
}

.accordion-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.accordion-number, .section-number {
  width: 32px;
  height: 32px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.accordion-title, .section-title-text {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-dark);
}

.accordion-chevron, .section-chevron {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform 0.3s;
}

.accordion-item.open .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-body, .section-body {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  background: white;
}

.accordion-body.hidden, .section-body.hidden {
  display: none !important;
}

/* Inner Accordion Content Styling */
.law-quote {
  background: #f8fafc;
  border-left: 4px solid var(--primary-color);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  font-size: 1rem;
  margin-bottom: 14px;
}

.source-link {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 700;
  text-decoration: none;
  margin-top: 8px;
}

.source-link:hover {
  text-decoration: underline;
}

.highlight-box {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  padding: 14px 18px;
  border-radius: 10px;
  margin: 14px 0;
  color: #92400e;
}

.example-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.example-label {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.evidence-category {
  margin-bottom: 16px;
}

.evidence-header {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.evidence-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}

.evidence-dot.strong { background: #10b981; }
.evidence-dot.support { background: #f59e0b; }

.evidence-title {
  font-weight: 700;
  font-size: 1rem;
}

.evidence-list {
  padding-left: 22px;
}

.step-flow {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f8fafc;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.step-circle {
  width: 26px;
  height: 26px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Law Explorer Grid */
.explorer-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  border: 1px solid var(--border-color);
}

.explorer-desc {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.laws-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.law-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 18px;
  border-radius: 12px;
}

.law-card h3 {
  font-size: 1.15rem;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.law-en {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.law-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.law-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--primary-color);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
}

/* Footer */
.app-footer {
  margin-top: 32px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  color: #92400e;
  text-align: center;
}

@media (max-width: 640px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .input-wrapper {
    flex-direction: column;
  }
  
  .search-btn {
    padding: 14px;
  }
}
