/* ============ SINAV KONU AĞIRLIK HARİTASI ============ */
/* js/exam-weights.js bileşeniyle çalışır — ÖZELLİK-006  */

.ew-section {
  padding: 4rem 0;
}

/* Başlık alanı */
.ew-section-head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.ew-section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 0.5rem;
}

.ew-section-head p {
  color: var(--neutral-500);
  font-size: 0.9rem;
  max-width: 42rem;
  margin: 0 auto;
}

/* Tab seçici */
.ew-tabs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.ew-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  border-radius: 9999px;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.ew-tab:hover {
  border-color: var(--primary-500);
}

.ew-tab--active {
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: var(--on-primary);
}

.ew-tab .material-symbols-outlined {
  font-size: 1.1rem;
}

/* Panel görünürlüğü */
.ew-panel {
  display: none;
}

.ew-panel--active {
  display: block;
}

/* Özet çubuklar (ana konu dağılımı) */
.ew-summary {
  display: flex;
  gap: 0.5rem;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 2rem;
  height: 2.5rem;
}

.ew-sum-piece {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--on-primary);
  transition: flex 0.8s ease;
  min-width: 0;
  overflow: hidden;
  border-radius: 0.5rem;
  padding: 0 0.4rem;
  white-space: nowrap;
}

/* Konu tablosu */
.ew-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: 0.75rem;
  overflow: hidden;
}

.ew-table thead th {
  padding: 0.6rem 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--neutral-500);
  text-align: left;
  background: var(--color-background);
  border-bottom: 1.5px solid var(--color-border);
}

.ew-table thead th:nth-child(2) {
  width: 40%;
}

.ew-table thead th:nth-child(3),
.ew-table thead th:nth-child(4) {
  text-align: center;
  width: 8rem;
}

/* Ana konu satırı */
.ew-row-main {
  cursor: pointer;
  transition: background 0.15s;
}

.ew-row-main:hover {
  background: color-mix(in srgb, var(--primary-500) 6%, var(--color-surface));
}

.ew-row-main td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.ew-row-main:last-of-type td {
  border-bottom: none;
}

/* Ders adı hücresi */
.ew-subject-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

.ew-subject-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-primary);
  flex-shrink: 0;
}

.ew-subject-icon .material-symbols-outlined {
  font-size: 1.1rem;
}

/* Bar hücresi */
.ew-bar-cell {
  padding-right: 1.5rem !important;
}

.ew-bar-track {
  height: 0.6rem;
  background: var(--color-background);
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.ew-bar-fill {
  height: 100%;
  border-radius: 9999px;
  width: 0%;
  transition: width 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  .ew-bar-fill,
  .ew-sum-piece {
    transition: none;
  }
}

/* Soru sayısı hücresi */
.ew-count-cell {
  text-align: center !important;
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
}

.ew-count-sub {
  display: block;
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--neutral-500);
  margin-top: 0.1rem;
}

/* Link hücresi */
.ew-link-cell {
  text-align: center !important;
}

.ew-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-500);
  text-decoration: none;
  padding: 0.3rem 0.75rem;
  border: 1.5px solid var(--primary-500);
  border-radius: 9999px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.ew-link:hover {
  background: var(--primary-500);
  color: var(--on-primary);
}

.ew-link--none {
  font-size: 0.78rem;
  color: var(--neutral-500);
  padding: 0.3rem 0.5rem;
}

.ew-link--soon {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-soft);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  white-space: nowrap;
}

/* Chevron ikonu */
.ew-chevron {
  font-size: 1.1rem !important;
  color: var(--neutral-500);
  transition: transform 0.25s;
  display: inline-block;
  vertical-align: middle;
}

.ew-row-main[aria-expanded="true"] .ew-chevron {
  transform: rotate(180deg);
}

/* Alt konu satırları */
.ew-sub-group {
  display: none;
}

.ew-sub-group--open {
  display: table-row-group;
}

.ew-row-sub td {
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.82rem;
  color: var(--neutral-500);
  vertical-align: middle;
}

.ew-row-sub:last-child td {
  border-bottom: 1.5px solid var(--color-border);
}

.ew-sub-bar-track {
  height: 0.35rem;
  background: var(--color-background);
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.ew-sub-bar-fill {
  height: 100%;
  border-radius: 9999px;
  opacity: 0.7;
  transition: width 0.7s ease 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  .ew-sub-bar-fill { transition: none; }
}

.ew-row-sub .ew-count-cell {
  font-size: 0.82rem;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .ew-section {
    padding: 2.5rem 0;
  }

  .ew-tabs {
    flex-wrap: wrap;
  }

  .ew-table thead th:nth-child(2) { width: auto; }
  .ew-table thead th:nth-child(4) { display: none; }
  .ew-table td:nth-child(4) { display: none; }

  .ew-row-sub td {
    padding-left: 1.5rem;
  }

  .ew-sum-piece {
    font-size: 0.62rem;
  }
}

@media (max-width: 540px) {
  .ew-table thead th:nth-child(3) { display: none; }
  .ew-table td:nth-child(3) { display: none; }

  .ew-subject-cell {
    font-size: 0.82rem;
  }
}
