// Dosya Listesi Component Stil Dosyası - Minimal & Kompakt

// Header
.header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 0 0.5rem;
}

.header-icon {
  font-size: 1.8rem;
  animation: float 3s ease-in-out infinite;
}

.header-content {
  flex: 1;
}

h3 {
  margin: 0;
  color: white;
  font-size: 1.15rem;
  font-weight: 600;
}

.subtitle {
  margin: 0.2rem 0 0 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
}

// Animasyonlar
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

// Kontrol Alanı
.kontrol-alan {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  align-items: center;
}

.ara-input {
  flex: 1;
  padding: 0.4rem 0.6rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: white;
  font-size: 0.85rem;
  transition: all 0.2s ease;

  &::placeholder {
    color: rgba(255, 255, 255, 0.4);
  }

  &:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(59, 130, 246, 0.4);
  }

  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
}

.kontrol-butonlar {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.sirala-select {
  padding: 0.4rem 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: white;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;

  &:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
  }

  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  option {
    background: #1f2937;
    color: white;
  }
}

.yenile-btn {
  padding: 0.4rem 0.6rem;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 4px;
  color: #60a5fa;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  min-width: 32px;

  &:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.25);
    transform: rotate(180deg);
  }

  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
}

// Dosya Container
.dosya-container {
  min-height: 50px;
}

.durum-mesaj {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;

  p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
  }

  .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-top: 2px solid #60a5fa;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 0.5rem;
  }
}

.dosya-sayac {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.4rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 3px;
}

// Dosya Item
.dosya-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  margin-bottom: 0.5rem;
  overflow: hidden;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  &:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
  }

  &.acik {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
  }
}

.dosya-baslik {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;

  &:hover {
    background: rgba(255, 255, 255, 0.03);
  }
}

.dosya-bilgi {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.toggle-icon {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.7rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;

  &.acik {
    transform: rotate(90deg);
  }
}

.dosya-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(59, 130, 246, 0.15);
  border-radius: 3px;
  color: #60a5fa;
  font-size: 0.7rem;
  font-weight: bold;
  flex-shrink: 0;
}

.dosya-meta {
  flex: 1;
  min-width: 0;
}

.dosya-adi {
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 0.1rem;
}

.dosya-boyut {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
}

// İşlem Butonları
.islem-butonlari {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
  margin-left: 0.4rem;
}

.btn-indir,
.btn-sil {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-indir {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;

  &:hover {
    background: rgba(34, 197, 94, 0.25);
    transform: scale(1.05);
  }
}

.btn-sil {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;

  &:hover {
    background: rgba(239, 68, 68, 0.25);
    transform: scale(1.05);
  }
}

// Dosya Detayları (Açılır)
.dosya-detay {
  padding: 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
}

.detay-satir {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.3rem 0;
  word-break: break-word;

  &:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.3rem;
    margin-bottom: 0.3rem;
  }
}

.detay-label {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
  flex-shrink: 0;
}

.detay-deger {
  color: rgba(255, 255, 255, 0.8);
  text-align: right;
  flex: 1;
}

.dosya-id {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}
