:host {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 8px;
  gap: 12px;
}

.sam-text-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: bold;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.lock-btn,
.back-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;

  &:hover {
    background: var(--muted);
  }

  .emoji {
    font-size: 16px;
  }
}

.backup-settings {
  background: var(--muted);
  padding: 12px;
  border-radius: 8px;
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 12px;

  label {
    font-weight: 500;
  }

  input[type="number"] {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--background);
    color: var(--foreground);
  }
}

.setting-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted-foreground);
}

.create-btn {
  align-self: flex-start;
}

.backups-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-state {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
  color: var(--muted-foreground);
}

.backup-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  gap: 12px;
}

.backup-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.backup-date {
  font-weight: 500;
  font-size: 13px;
}

.backup-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
}

.backup-reason {
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;

  &.reason-auto {
    background: var(--muted);
    color: var(--muted-foreground);
  }

  &.reason-manual {
    background: rgba(34, 197, 94, 0.2);
    color: rgb(34, 197, 94);
  }

  &.reason-prerestore {
    background: rgba(234, 179, 8, 0.2);
    color: rgb(234, 179, 8);
  }
}

.backup-identities {
  color: var(--muted-foreground);
}

.backup-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;

  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);

  &:hover:not(:disabled) {
    opacity: 0.9;
  }
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);

  &:hover:not(:disabled) {
    background: var(--muted);
  }
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: rgb(239, 68, 68);

  &:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.3);
  }
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}
