/* Backup Styles - Enhanced Light Theme */

.server-backups-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.server-name {
  font-size: 1.2rem;
  font-weight: bold;
  padding: 0.5rem 1rem;
  background: var(--card-background);
  color: var(--secondary-color);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
}

.backups-actions {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: flex-start;
  gap: 0.75rem;
}

.backups-list {
  display: grid;
  grid-template-columns: 1fr; /* list view */
  gap: 1rem;
  max-width: 820px;
  margin: 0 auto;
}

/* Backup card base styling (list row container) */
.backup-card {
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  padding: 0.75rem 1rem;
}



@media (max-width: 900px) {
  .backups-list {
    max-width: 96%;
  }
  .backup-card {
    max-width: 100%;
  }
}

.backup-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  border-color: var(--primary-color);
}

.backup-header {
  padding: 0;
  background: transparent;
  border-bottom: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.backup-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0;
  color: var(--heading-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.backup-title i {
  color: var(--primary-color);
  font-size: 1rem;
}

/* Inline title styling within list row */
.backup-info .backup-title {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1rem;
  font-family: var(--heading-font, inherit);
  margin-right: 1rem;
}

.backup-content {
  padding: 0;
  background: transparent;
}

.backup-info {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.backup-info .info-item {
  display: flex;
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  border-left: none;
  align-items: center;
  gap: 0.5rem;
}

.backup-info .label {
  width: auto;
  font-weight: 600;
  color: var(--secondary-color);
  font-size: 0.9rem;
  margin-right: 0.5rem;
  white-space: nowrap;
}

.backup-info .value {
  flex: 1;
  color: var(--text-color);
  font-weight: 500;
  white-space: nowrap;
}

.backup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border-top: none;
}

/* List row layout on larger screens */
@media (min-width: 700px) {
  .backup-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
  .backup-info {
    display: flex;
    align-items: center;
    gap: 1.25rem;
  }
}

/* Stacked layout on small screens */
@media (max-width: 699px) {
  .backup-actions {
    margin-top: 0.75rem;
  }
}

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--secondary-color);
  font-style: normal;
  background: var(--card-background);
  border-radius: 12px;
  border: 2px dashed var(--border-color);
}

.empty-state i {
  font-size: 3rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  display: block;
}

.hidden {
  display: none;
}

.alert {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

.alert i {
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

.alert-warning {
  background-color: rgba(255, 193, 7, 0.15);
  color: var(--warning-color);
  border: 1px solid var(--warning-color);
}

/* Progress Bar Styles */
.progress-container {
  margin: 1rem 0;
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.progress-container.active {
  display: block;
}

.progress-bar {
  width: 100%;
  height: 20px;
  background-color: var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
  border-radius: 10px;
  transition: width 0.3s ease;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-image: linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.2) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.2) 75%,
    transparent 75%,
    transparent
  );
  background-size: 20px 20px;
  animation: progress-animation 1s linear infinite;
}

@keyframes progress-animation {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 20px 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.progress-text {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--secondary-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-percentage {
  font-weight: bold;
  color: var(--primary-color);
  background-color: color-mix(in srgb, var(--primary-color) 15%, transparent);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Success state */
.progress-fill.complete {
  background: linear-gradient(90deg, var(--success-color), #20c997);
}

/* Error state */
.progress-fill.error {
  background: linear-gradient(90deg, var(--danger-color), #c82333);
}

/* RTL Support */
.rtl .backup-info .label {
  text-align: right;
}

.rtl .backup-header,
.rtl .backup-info .info-item,
.rtl .backup-actions {
  flex-direction: row-reverse;
}

.rtl .alert i {
  margin-right: 0;
  margin-left: 0.5rem;
}