/**
 * Hostingowy — Backup Management Styles
 * =============================================================================
 * Styles for the backup management dashboard page.
 */

/* ── Spinner Animation ─────────────────────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── Schedule Badge ────────────────────────────────────────────────────────── */
.schedule-badge-enabled {
  background: rgba(0, 200, 83, 0.15);
  color: #4caf50;
  border: 1px solid rgba(0, 200, 83, 0.3);
}

.schedule-badge-paused {
  background: rgba(255, 152, 0, 0.15);
  color: #ff9800;
  border: 1px solid rgba(255, 152, 0, 0.3);
}

.schedule-badge-none {
  background: rgba(255, 255, 255, 0.05);
  color: #666;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ── Status Badges ──────────────────────────────────────────────────────────── */
.status-completed {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(0, 200, 83, 0.12);
  color: #4caf50;
}

.status-running {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
}

.status-running::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #818cf8;
  animation: pulse 1.5s ease-in-out infinite;
}

.status-failed {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(255, 68, 68, 0.12);
  color: #ff6666;
}

.status-deleted {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  color: #666;
}

/* ── Backup Type Labels ─────────────────────────────────────────────────────── */
.type-manual {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
}

.type-automated {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  background: rgba(0, 200, 83, 0.1);
  color: #4caf50;
}

/* ── Restore Status ─────────────────────────────────────────────────────────── */
.restore-completed {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(0, 200, 83, 0.12);
  color: #4caf50;
}

.restore-running {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
}

.restore-running::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #818cf8;
  animation: pulse 1.5s ease-in-out infinite;
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn-action {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid #444;
  border-radius: 8px;
  color: #aaa;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-action:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: #666;
  color: #fff;
}

.btn-action.btn-restore {
  border-color: rgba(255, 152, 0, 0.4);
  color: #ffb74d;
}

.btn-action.btn-restore:hover {
  background: rgba(255, 152, 0, 0.1);
  border-color: #ff9800;
}

.btn-action.btn-delete {
  border-color: rgba(255, 68, 68, 0.3);
  color: #ff6666;
}

.btn-action.btn-delete:hover {
  background: rgba(255, 68, 68, 0.1);
  border-color: #ff4444;
}

/* ── Restore Option Hover ──────────────────────────────────────────────────── */
.restore-option:hover {
  border-color: #6366f1 !important;
  background: rgba(99, 102, 241, 0.05) !important;
}

.restore-option input[type="radio"]:checked ~ div {
  /* Visual cue when selected */
}

/* ── Disabled Button State ─────────────────────────────────────────────────── */
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Table Row Hover ───────────────────────────────────────────────────────── */
.backups-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s;
}

.backups-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.backups-table tbody tr:last-child {
  border-bottom: none;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .backups-table {
    font-size: 0.8rem;
  }

  .backups-table th,
  .backups-table td {
    padding: 10px 10px;
  }

  .btn-action {
    padding: 4px 10px;
    font-size: 0.75rem;
  }

  .schedule-details-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .backups-table th:nth-child(4),
  .backups-table td:nth-child(4) {
    display: none; /* Hide size column on very small screens */
  }

  .schedule-details-grid {
    grid-template-columns: 1fr;
  }
}
