/*
 * Sınav Paneli Sayfasına Özel Stiller (sinavPanel.js)
 * v1.0 - Sınav Sonuçları Görüntüleme Modülü
 * 
 * Bu dosya, sadece sinavpanel.html sayfasını etkileyen
 * özel stil kurallarını içerir. Genel stiller (body, container, başlık)
 * diğer CSS dosyalarından alınmaktadır.
 * 
 * Bölüm Sıralaması:
 * • Sayfaya Özel Konteyner
 * • Tablo Stilleri
 * • Yapışkan Sütun ve Satır Renklendirme
 * • Öğrenci Link Stili
 * • Ders Hücre Stili
 * • Responsive & Mobile Styles
 */

/* =========================================================
   SAyfaya Özel Konteyner Genişliği
   ========================================================= */

/* temel.css'deki 900px'i bu sayfa için ezip 1100px yapar */
.container {
  max-width: 1100px;
}

/* Mobil mavi vurguyu kaldırmak için */
* {
  -webkit-tap-highlight-color: transparent;
}

/* =========================================================
   TABLO STİLLERİ
   ========================================================= */

.table-responsive {
  position: relative;
  overflow-x: auto;
  margin-top: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
  font-size: 15px;
  white-space: normal;
  word-break: break-word;
}

th {
  background-color: #f2f2f2;
  font-weight: bold;
  color: #000000;
  font-size: 14px;
  padding: 6px 4px;
}

/* =========================================================
   YAPIŞ SÜTUN VE SATIR RENKLENDİRMESİ
   ========================================================= */

th:first-child,
td:first-child {
  position: sticky;
  left: 0;
  z-index: 10;
  /* İsim sütununu sabitlemek ve kaymayı önlemek için eklendi */
  min-width: 180px;
  width: 180px;
  white-space: nowrap;
}

th:first-child {
  background-color: #f0f0f0;
}

tr:nth-child(odd) td:first-child {
  background-color: #ffffff;
}

tr:nth-child(even) {
  background-color: #f9f9f9;
}

tr:nth-child(even) td:first-child {
  background-color: #f9f9f9;
}

tr:hover {
  background-color: #e9e9e9;
}

tr:hover td:first-child {
  background-color: #e9e9e9;
}

/* =========================================================
   ÖĞRENCİ LİNK STİLİ
   ========================================================= */

.student-link {
  color: #ac1818fd;
  text-decoration: none;
  font-weight: bold;
}

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

/* =========================================================
   DERS HÜCRE STİLİ
   ========================================================= */

.ders-hucre {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1.4;
  height: 100%;
  box-sizing: border-box;
  gap: 2px;
}

.ders-hucre .dyb {
  font-weight: normal;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1;
}

.ders-hucre .net {
  font-weight: normal;
  font-size: 15px;
  color: #000;
  white-space: nowrap;
  margin-top: 0px;
  line-height: 1;
}

/* =========================================================
   SPINNER STİLLERİ
   ========================================================= */

.gemini-spinner {
  display: block;
  width: 40px;
  height: 40px;
  margin: 20px auto;
  border-radius: 50%;
  border: 4px solid rgba(0, 0, 0, 0.08);
  border-top-color: #c82323;
  animation: spinner-rotate 1s linear infinite;
}

.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spinner-rotate 0.6s linear infinite;
  margin-right: 6px;
}

/* Loading Hücre */
.loading-cell {
  text-align: center;
  padding: 40px;
}

.loading-cell .gemini-spinner {
  margin: 0 auto 15px;
}

/* Analiz Yükleniyor Metni */
.analysis-loading {
  text-align: center;
}

/* Hata Mesajı */
.error-modal-message {
  color: red;
}

.table-responsive.loading table {
  opacity: 0.2;
  filter: blur(0.3px);
  pointer-events: none;
}

.table-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  z-index: 5;
}

@keyframes spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

/* =========================================================
   RESPONSİVE TASARIM (1024px'den küçük)
   ========================================================= */

@media (max-width: 1024px) {
  th, td {
    padding: 6px 4px;
    font-size: 14px;
  }
  
  th {
    font-size: 14px;
  }
  
  .ders-hucre {
    font-size: 14px;
  }
  
  .ders-hucre .dyb {
    font-size: 14px;
  }
  
  .ders-hucre .net {
    font-size: 14px;
  }
}

/* =========================================================
   RESPONSİVE TASARIM (768px'den küçük)
   ========================================================= */

@media (max-width: 768px) {
  th, td {
    padding: 5px 3px;
    font-size: 13px;
  }
  
  th {
    font-size: 13px;
    padding: 4px 3px;
  }
  
  .ders-hucre {
    font-size: 13px;
    line-height: 1.3;
  }
  
  .ders-hucre .dyb {
    font-size: 13px;
  }
  
  .ders-hucre .net {
    font-size: 13px;
  }
  
  th:first-child,
  td:first-child {
    min-width: 120px;
    width: 120px;
  }
}

/* =========================================================
   MOBİL TASARIM (480px'den küçük)
   ========================================================= */

@media (max-width: 480px) {
  .table-responsive {
    overflow-x: auto;
  }
  
  table {
    min-width: 100%;
  }
  
  th, td {
    padding: 5px 3px;
    font-size: 12px;
    white-space: nowrap;
  }
  
  th {
    font-size: 12px;
    padding: 3px 2px;
  }
  
  .ders-hucre {
    font-size: 12px;
    line-height: 1.3;
  }
  
  .ders-hucre .dyb {
    font-size: 12px;
  }
  
  .ders-hucre .net {
    font-size: 12px;
    margin-top: 0px;
  }
  
  th:first-child,
  td:first-child {
    min-width: 100px;
    width: 100px;
    font-size: 12px;
  }
}
