.lgs-okul-widget {
  width: 100%;
  box-sizing: border-box;
  font-size: 15px;
}

.lgs-filter-bar {
  margin: 0 0 12px;
}

.lgs-filter-bar label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}

.lgs-il-select {
  width: 100%;
  max-width: 300px;
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid #d6d6d6;
  border-radius: 5px;
  background: #fff;
  font-size: 15px;
}

.lgs-result-info {
  margin-top: 7px;
  font-size: 14px;
}

.lgs-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.lgs-okul-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: auto;
  background: #fff;
}

.lgs-okul-table th,
.lgs-okul-table td {
  border: 1px solid #dedede;
  padding: 9px 7px;
  text-align: left;
  vertical-align: middle;
}

.lgs-okul-table th {
  background: #f4f4f4;
  font-weight: 700;
  white-space: normal;
}

.lgs-okul-table tbody tr:nth-child(even) td {
  background: #fafafa;
}

.lgs-okul-table th:nth-child(1),
.lgs-okul-table td:nth-child(1) { min-width: 110px; }
.lgs-okul-table th:nth-child(2),
.lgs-okul-table td:nth-child(2) { min-width: 120px; }
.lgs-okul-table th:nth-child(3),
.lgs-okul-table td:nth-child(3) { min-width: 290px; }
.lgs-okul-table th:nth-child(4),
.lgs-okul-table td:nth-child(4) { min-width: 145px; }
.lgs-okul-table th:nth-child(5),
.lgs-okul-table td:nth-child(5) { min-width: 105px; }
.lgs-okul-table th:nth-child(6),
.lgs-okul-table td:nth-child(6) { min-width: 120px; }
.lgs-okul-table th:nth-child(7),
.lgs-okul-table td:nth-child(7) { min-width: 105px; }

.lgs-data-row[hidden] {
  display: none !important;
}

/*
 * Mobil görünüm:
 * 7 sütunu telefonda küçücük bir tabloya sıkıştırmak yerine her okul tek kart olarak
 * gösterilir. Böylece Taban Puanı, Yabancı Dil, Öğretim Süresi ve Boş Kontenjan
 * yatay kaydırma gerektirmeden tamamen görünür.
 */
@media (max-width: 767px) {
  .lgs-okul-widget {
    width: 100%;
    max-width: 100%;
    font-size: 14px;
    box-sizing: border-box;
  }

  .lgs-il-select {
    max-width: 100%;
    min-height: 46px;
    font-size: 16px;
  }

  .lgs-result-info {
    line-height: 1.45;
  }

  .lgs-table-wrap {
    overflow-x: visible;
    width: 100%;
    max-width: 100%;
  }

  .lgs-okul-table,
  .lgs-okul-table tbody,
  .lgs-okul-table tr,
  .lgs-okul-table td {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .lgs-okul-table {
    min-width: 0 !important;
    border: 0;
    background: transparent;
  }

  .lgs-okul-table thead {
    display: none;
  }

  .lgs-okul-table tbody tr.lgs-data-row {
    margin: 0 0 14px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
  }

  .lgs-okul-table tbody tr:nth-child(even) td,
  .lgs-okul-table tbody tr:nth-child(odd) td {
    background: #fff;
  }

  .lgs-okul-table td,
  .lgs-okul-table td:nth-child(n) {
    min-width: 0 !important;
    width: 100% !important;
    display: grid;
    grid-template-columns: minmax(105px, 34%) minmax(0, 66%);
    gap: 10px;
    align-items: start;
    padding: 9px 11px;
    border: 0;
    border-bottom: 1px solid #ececec;
    line-height: 1.4;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .lgs-okul-table td:last-child {
    border-bottom: 0;
  }

  .lgs-okul-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #222;
    min-width: 0;
  }

  .lgs-okul-table td[data-label="Okul Adı"] {
    font-weight: 600;
  }

  .lgs-okul-table td[data-label="Okul Adı"]::before {
    font-weight: 700;
  }

  .lgs-data-row[hidden] {
    display: none !important;
  }
}

/*
 * 81 il yazıları: sidebar kapalı + tam genişlik içerik.
 * Sadece eklentinin _lgs_il_yazisi_il meta alanına sahip yazılarda çalışır.
 * Jannah/TieLabs ve yaygın WordPress tema sınıfları hedeflenir.
 */
body.lgs-il-yazisi-fullwidth #content .sidebar,
body.lgs-il-yazisi-fullwidth #content #sidebar,
body.lgs-il-yazisi-fullwidth .site-content .sidebar,
body.lgs-il-yazisi-fullwidth .site-content #sidebar,
body.lgs-il-yazisi-fullwidth .main-content + .sidebar,
body.lgs-il-yazisi-fullwidth aside.sidebar {
  display: none !important;
}

body.lgs-il-yazisi-fullwidth #content .main-content,
body.lgs-il-yazisi-fullwidth #content .content-area,
body.lgs-il-yazisi-fullwidth #content .tie-col-md-8,
body.lgs-il-yazisi-fullwidth .site-content .main-content,
body.lgs-il-yazisi-fullwidth .site-content .content-area {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  flex: 0 0 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.lgs-il-yazisi-fullwidth .lgs-table-wrap {
  max-width: 100%;
}

@media (max-width: 767px) {
  body.lgs-il-yazisi-fullwidth .entry-content,
  body.lgs-il-yazisi-fullwidth .post-content,
  body.lgs-il-yazisi-fullwidth .entry,
  body.lgs-il-yazisi-fullwidth .main-content,
  body.lgs-il-yazisi-fullwidth .content-area {
    max-width: 100% !important;
    box-sizing: border-box;
  }
}
