/* Surah Statistics Styles */
.surahs-stats {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px var(--shadow-color);
  overflow: hidden;
}

.surahs-stats-header {
  display: grid;
  grid-template-columns: 0.5fr 2fr 1fr 1fr 1fr 1fr;
  gap: 10px;
  background-color: var(--primary-color);
  color: white;
  padding: 15px;
  font-weight: bold;
  text-align: center;
}

.surah-item {
  display: grid;
  grid-template-columns: 0.5fr 2fr 1fr 1fr 1fr 1fr;
  gap: 10px;
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease;
  align-items: center;
  text-align: center;
}

.surah-item:hover {
  background-color: rgba(246, 173, 85, 0.1);
}

.surah-item:last-child {
  border-bottom: none;
}

.surah-number {
  font-weight: bold;
  color: var(--primary-color);
}

.surah-name {
  font-weight: 500;
  color: var(--text-color);
  text-align: right;
}

html[dir="ltr"] .surah-name {
  text-align: left;
}

.surah-ayat,
.surah-words,
.surah-chars {
  color: var(--light-text-color);
}

.surah-actions {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.8rem;
  border-radius: 4px;
}

/* Add search filter styling */
.search-container {
  margin-bottom: 20px;
}

#surah-search {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

#surah-search:focus {
  outline: none;
  border-color: var(--secondary-color);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .surahs-stats-header,
  .surah-item {
    grid-template-columns: 0.5fr 1.5fr 1fr 1fr 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .surahs-stats-header,
  .surah-item {
    grid-template-columns: 0.5fr 1.5fr 0.8fr 0.8fr 0.8fr 1fr;
    font-size: 0.9rem;
    gap: 5px;
    padding: 10px;
  }
  
  .btn-sm {
    padding: 4px 8px;
    font-size: 0.7rem;
  }
}

@media (max-width: 600px) {
  .surahs-stats-header,
  .surah-item {
    grid-template-columns: 0.5fr 1.5fr 0.7fr 0.7fr 0.7fr 1fr;
    font-size: 0.8rem;
    gap: 3px;
    padding: 8px;
  }
  
  .btn-sm {
    padding: 3px 6px;
    font-size: 0.7rem;
  }
  
  .surah-actions {
    gap: 2px;
  }
}

@media (max-width: 480px) {
  .surahs-stats-header div:nth-child(4),
  .surahs-stats-header div:nth-child(5),
  .surah-item div:nth-child(4),
  .surah-item div:nth-child(5) {
    display: none;
  }
  
  .surahs-stats-header,
  .surah-item {
    grid-template-columns: 0.5fr 2fr 1fr 1fr;
  }
}

/* Add search filter to top of the stats section */
.surah-search-container {
  margin-bottom: 20px;
  position: relative;
}

.surah-search-container i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--light-text-color);
}

html[dir="rtl"] .surah-search-container i {
  left: auto;
  right: 15px;
}

#surah-search {
  width: 100%;
  padding: 10px 15px 10px 40px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

html[dir="rtl"] #surah-search {
  padding: 10px 40px 10px 15px;
}

#surah-search:focus {
  outline: none;
  border-color: var(--secondary-color);
}

/* Stats summary section */
.stats-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stats-card {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px var(--shadow-color);
  text-align: center;
  transition: transform 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-5px);
}

.stats-card h3 {
  color: var(--primary-color);
  margin-bottom: 5px;
  font-size: 1.2rem;
}

.stats-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--secondary-color);
}

.stats-label {
  color: var(--light-text-color);
  font-size: 0.9rem;
  margin-top: 5px;
}

@media (max-width: 768px) {
  .stats-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stats-summary {
    grid-template-columns: 1fr;
  }
}
